gilramos commited on
Commit
816ad81
1 Parent(s): e31ea1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,12 +31,12 @@ user_friendly_name_list = list(user_friendly_name.values())
31
  #demo = gr.Interface.from_pipeline(pipe)
32
  #demo.launch()
33
 
34
- def predict(text, chosen_model_name):
35
 
36
- chosen_model = reverse_user_friendly_name[chosen_model_name]
37
 
38
  # Initialize the pipeline with the chosen model
39
- model_pipeline = pipeline("text-classification", model=chosen_model)
40
  result = model_pipeline(text)
41
  label = result[0]['label']
42
 
 
31
  #demo = gr.Interface.from_pipeline(pipe)
32
  #demo.launch()
33
 
34
+ def predict(text, chosen_model):
35
 
36
+ chosen_model_name = reverse_user_friendly_name[chosen_model]
37
 
38
  # Initialize the pipeline with the chosen model
39
+ model_pipeline = pipeline("text-classification", model=chosen_model_name)
40
  result = model_pipeline(text)
41
  label = result[0]['label']
42