Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ model = None
|
|
25 |
|
26 |
def load_model(model_name):
|
27 |
global model
|
28 |
-
model = gr.load(model_name, api_key=api_key)
|
29 |
|
30 |
def predict(inputs):
|
31 |
return model.predict(inputs)
|
@@ -40,4 +40,4 @@ iface = gr.Interface(
|
|
40 |
|
41 |
load_model(default_model) # Load the default model initially
|
42 |
|
43 |
-
iface.launch()
|
|
|
25 |
|
26 |
def load_model(model_name):
|
27 |
global model
|
28 |
+
model = gr.load(model_name, source="huggingface", api_key=api_key)
|
29 |
|
30 |
def predict(inputs):
|
31 |
return model.predict(inputs)
|
|
|
40 |
|
41 |
load_model(default_model) # Load the default model initially
|
42 |
|
43 |
+
iface.launch()
|