Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ from gradio_client import Client
|
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
import random
|
| 5 |
#ss_client = Client("https://omnibus-html-image-current-tab.hf.space/")
|
| 6 |
-
|
| 7 |
models_og=[
|
| 8 |
"google/gemma-7b",
|
| 9 |
"google/gemma-7b-it",
|
|
@@ -43,7 +43,7 @@ def load_models(inp,new_models):
|
|
| 43 |
#print(new_models[inp[0]])
|
| 44 |
client_z.clear()
|
| 45 |
for z,ea in enumerate(inp):
|
| 46 |
-
client_z.append(InferenceClient(new_models[inp[z]],token=
|
| 47 |
out_box[z]=(gr.update(label=new_models[inp[z]]))
|
| 48 |
return out_box[0],out_box[1],out_box[2],out_box[3]
|
| 49 |
|
|
|
|
| 3 |
from huggingface_hub import InferenceClient
|
| 4 |
import random
|
| 5 |
#ss_client = Client("https://omnibus-html-image-current-tab.hf.space/")
|
| 6 |
+
token = os.getenv(["HF_TOKEN"])
|
| 7 |
models_og=[
|
| 8 |
"google/gemma-7b",
|
| 9 |
"google/gemma-7b-it",
|
|
|
|
| 43 |
#print(new_models[inp[0]])
|
| 44 |
client_z.clear()
|
| 45 |
for z,ea in enumerate(inp):
|
| 46 |
+
client_z.append(InferenceClient(new_models[inp[z]],token=token))
|
| 47 |
out_box[z]=(gr.update(label=new_models[inp[z]]))
|
| 48 |
return out_box[0],out_box[1],out_box[2],out_box[3]
|
| 49 |
|