Spaces:
Runtime error
Runtime error
Quentin GALLOUÉDEC
commited on
Commit
·
aa1cd96
1
Parent(s):
0625494
gymnasium dependency
Browse files- app.py +1 -2
- requirements.txt +2 -1
app.py
CHANGED
@@ -16,12 +16,11 @@ default_model_name = "gia-project/gia2-small-untrained"
|
|
16 |
|
17 |
|
18 |
def generate_text(model_name, input_text):
|
19 |
-
|
20 |
-
|
21 |
# Check if the selected model is already loaded
|
22 |
if model_name not in model_pipelines:
|
23 |
# Inform the user that the model is loading
|
24 |
yield "Loading model..."
|
|
|
25 |
# Load the model and create a pipeline if it's not already loaded
|
26 |
generator = pipeline("text-generation", model=model_name, trust_remote_code=True)
|
27 |
model_pipelines[model_name] = generator
|
|
|
16 |
|
17 |
|
18 |
def generate_text(model_name, input_text):
|
|
|
|
|
19 |
# Check if the selected model is already loaded
|
20 |
if model_name not in model_pipelines:
|
21 |
# Inform the user that the model is loading
|
22 |
yield "Loading model..."
|
23 |
+
|
24 |
# Load the model and create a pipeline if it's not already loaded
|
25 |
generator = pipeline("text-generation", model=model_name, trust_remote_code=True)
|
26 |
model_pipelines[model_name] = generator
|
requirements.txt
CHANGED
@@ -1,3 +1,4 @@
|
|
1 |
transformers
|
2 |
torch
|
3 |
-
huggingface_hub
|
|
|
|
1 |
transformers
|
2 |
torch
|
3 |
+
huggingface_hub
|
4 |
+
gymnasium
|