Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
# Import necessary libraries
|
| 2 |
import gradio as gr # Gradio is used to create web interfaces for Python scripts.
|
| 3 |
from transformers import AutoConfig # AutoConfig is from the Hugging Face Transformers library, used to create configuration for various models.import gradio as gr
|
| 4 |
-
|
| 5 |
|
| 6 |
# A list of model names to start with. These are names of popular models from the Hugging Face library.
|
| 7 |
-
model_list = ["bert-base-uncased", "gpt2","mosaicml/mpt-30b", "distilbert-base-uncased,",""]
|
| 8 |
|
| 9 |
# Function to add a new model to the list.
|
| 10 |
def add_model_to_list(new_model):
|
|
|
|
| 1 |
# Import necessary libraries
|
| 2 |
import gradio as gr # Gradio is used to create web interfaces for Python scripts.
|
| 3 |
from transformers import AutoConfig # AutoConfig is from the Hugging Face Transformers library, used to create configuration for various models.import gradio as gr
|
| 4 |
+
import AutoTokenizer, AutoModelForCausalLM, AutoModel
|
| 5 |
|
| 6 |
# A list of model names to start with. These are names of popular models from the Hugging Face library.
|
| 7 |
+
model_list = ["bert-base-uncased", "google/switch-c-2048", "gpt2","mosaicml/mpt-30b", "distilbert-base-uncased,",""]
|
| 8 |
|
| 9 |
# Function to add a new model to the list.
|
| 10 |
def add_model_to_list(new_model):
|