xnetba commited on
Commit
3509ad8
·
1 Parent(s): 03bb62e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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()