bright1 commited on
Commit
9efa5a4
1 Parent(s): 2dcac3c

Replaced Dropdown with Radio widget to enable interpretation

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -63,10 +63,8 @@ def sentiment_analysis(model_type, text):
63
  return scores
64
  # , hist_df.head()
65
 
66
-
67
- model_type = gr.Dropdown(choices=['distilbert', 'roberta'], label='Select model type', allow_custom_value=False, value='roberta')
68
-
69
-
70
  #Gradio app interface
71
  demo = gr.Interface(fn = sentiment_analysis,
72
  inputs = [model_type, gr.TextArea("Write your text or tweet here", label="Analyze your COVID-19 tweets" )],
@@ -74,6 +72,6 @@ demo = gr.Interface(fn = sentiment_analysis,
74
  title = "COVID-19 Vaccine Tweet Analyzer App",
75
  description = "COVID-19 Tweets Analyzer",
76
  interpretation = "default",
77
- examples = [['roberta', "Being vaccinated is actually awesome :)"]]
78
- ).launch()
79
 
 
63
  return scores
64
  # , hist_df.head()
65
 
66
+ model_type = gr.Radio(choices=['distilbert', 'roberta'], label='Select model type', allow_custom_value=False, value='roberta')
67
+ #Gradio app interface
 
 
68
  #Gradio app interface
69
  demo = gr.Interface(fn = sentiment_analysis,
70
  inputs = [model_type, gr.TextArea("Write your text or tweet here", label="Analyze your COVID-19 tweets" )],
 
72
  title = "COVID-19 Vaccine Tweet Analyzer App",
73
  description = "COVID-19 Tweets Analyzer",
74
  interpretation = "default",
75
+ examples = [["roberta", "Being vaccinated is actually awesome :)"]]
76
+ ).launch(share=True, server_port=8080)
77