Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,13 +9,15 @@ import gradio as gr
|
|
| 9 |
text_generator = None
|
| 10 |
is_hugging_face = True
|
| 11 |
model_id = "google/gemma-2-9b-it"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
def init():
|
| 13 |
global text_generator
|
| 14 |
-
|
| 15 |
-
if not huggingface_token:
|
| 16 |
-
pass
|
| 17 |
-
print("no HUGGINGFACE_TOKEN if you need set secret ")
|
| 18 |
-
#raise ValueError("HUGGINGFACE_TOKEN environment variable is not set")
|
| 19 |
|
| 20 |
|
| 21 |
#model_id = "microsoft/Phi-3-mini-128k-instruct"
|
|
|
|
| 9 |
text_generator = None
|
| 10 |
is_hugging_face = True
|
| 11 |
model_id = "google/gemma-2-9b-it"
|
| 12 |
+
huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
|
| 13 |
+
if not huggingface_token:
|
| 14 |
+
pass
|
| 15 |
+
print("no HUGGINGFACE_TOKEN if you need set secret ")
|
| 16 |
+
#raise ValueError("HUGGINGFACE_TOKEN environment variable is not set")
|
| 17 |
+
|
| 18 |
def init():
|
| 19 |
global text_generator
|
| 20 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
#model_id = "microsoft/Phi-3-mini-128k-instruct"
|