Hi. A schema created from upload has to be in JSON format. You can upload a CSV as a dataset and use those fields, but it won't generate a schema.
I imagine if you have a very clear definition and you understand the options available for different data types you could programmatically build one, or manually type out a a JSON schema and import it, though you might as well use the interface for that. Depending on your need, one approach might be to start the schema in the interface, export it, and then use code to modify the bit that you want custom, then update the schema from the JSON.