torileatherman commited on
Commit
6311754
1 Parent(s): d3907c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -11,17 +11,17 @@ dataset_api.download("Resources/images/latest_passenger_prediction.png")
11
  def article_selection(sentiment):
12
  if sentiment == "Positive":
13
  return gr.image('latest_passenger_prediction.png')#f"""The sentence you requested is Positive!"""
14
- elif sentiment == "Negative":
15
- return f"""The sentence you requested is Negative!"""
16
- else:
17
- return f"""The sentence you requested is Neutral!"""
18
 
19
 
20
 
21
  demo = gr.Interface(
22
  fn=article_selection,
23
- inputs = gr.inputs.Dropdown(["Positive","Negative","Neutral"], label="What type of news articles would you like recommended?"),
24
- outputs = [gr.outputs.Image(label="Sentiment of News Articles")],
25
  )
26
 
27
 
 
11
  def article_selection(sentiment):
12
  if sentiment == "Positive":
13
  return gr.image('latest_passenger_prediction.png')#f"""The sentence you requested is Positive!"""
14
+ #elif sentiment == "Negative":
15
+ # return f"""The sentence you requested is Negative!"""
16
+ #else:
17
+ # return f"""The sentence you requested is Neutral!"""
18
 
19
 
20
 
21
  demo = gr.Interface(
22
  fn=article_selection,
23
+ inputs = gr.Dropdown(["Positive","Negative","Neutral"], label="What type of news articles would you like recommended?"),
24
+ outputs = [gr.Image(label="Sentiment of News Articles")],
25
  )
26
 
27