This is a template repository for text to image to support generic inference with Hugging Face Hub generic Inference API. There are two required steps
Specify the requirements by defining a requirements.txt file.
Implement the pipeline.py__init__ and __call__ methods. These methods are called by the Inference API. The __init__ method should load the model and preload all the elements needed for inference (model, processors, tokenizers, etc.). This is only called once. The __call__ method performs the actual inference. Make sure to follow the same input/output specifications defined in the template for the pipeline to work.
Model Card for {{ model_id | default("Model ID", true) }}
{{ model_summary | default("", true) }}
Model Details
Model Description
{{ model_description | default("", true) }}
Developed by: {{ developers | default("[More Information Needed]", true)}}
Funded by [optional]: {{ funded_by | default("[More Information Needed]", true)}}
Shared by [optional]: {{ shared_by | default("[More Information Needed]", true)}}
Model type: {{ model_type | default("[More Information Needed]", true)}}
Language(s) (NLP): {{ language | default("[More Information Needed]", true)}}
License: {{ license | default("[More Information Needed]", true)}}
Finetuned from model [optional]: {{ base_model | default("[More Information Needed]", true)}}
Model Sources [optional]
Repository: {{ repo | default("[More Information Needed]", true)}}
Paper [optional]: {{ paper | default("[More Information Needed]", true)}}
Demo [optional]: {{ demo | default("[More Information Needed]", true)}}
Uses
Direct Use
{{ direct_use | default("[More Information Needed]", true)}}
Downstream Use [optional]
{{ downstream_use | default("[More Information Needed]", true)}}
Out-of-Scope Use
{{ out_of_scope_use | default("[More Information Needed]", true)}}
Bias, Risks, and Limitations
{{ bias_risks_limitations | default("[More Information Needed]", true)}}
Recommendations
{{ bias_recommendations | default("Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.", true)}}
How to Get Started with the Model
Use the code below to get started with the model.
{{ get_started_code | default("[More Information Needed]", true)}}
Training Details
Training Data
{{ training_data | default("[More Information Needed]", true)}}
Training Procedure
Preprocessing [optional]
{{ preprocessing | default("[More Information Needed]", true)}}
Training Hyperparameters
Training regime: {{ training_regime | default("[More Information Needed]", true)}}
Speeds, Sizes, Times [optional]
{{ speeds_sizes_times | default("[More Information Needed]", true)}}
Evaluation
Testing Data, Factors & Metrics
Testing Data
{{ testing_data | default("[More Information Needed]", true)}}
Factors
{{ testing_factors | default("[More Information Needed]", true)}}
Metrics
{{ testing_metrics | default("[More Information Needed]", true)}}
Results
{{ results | default("[More Information Needed]", true)}}
Summary
{{ results_summary | default("", true) }}
Model Examination [optional]
{{ model_examination | default("[More Information Needed]", true)}}