torileatherman's picture
Update app.py
8942d1e
raw
history blame
727 Bytes
import gradio as gr
def article_selection(sentiment):
if sentiment == "Positive":
return f"""The sentence you requested is Positive!"""
elif sentiment == "Negative":
return f"""The sentence you requested is Negative!"""
else:
return f"""The sentence you requested is Neutral!"""
demo = gr.Interface(
fn=article_selection,
inputs = gr.inputs.Dropdown(["Positive","Negative","Neutral"], label="What type of news articles would you like recommended?"),
outputs = [gr.outputs.Textbox(label="Sentiment of News Articles")],
)
#TODO
#demo = gr.TabbedInterface([url_demo, voice_demo], ["Swedish YouTube Video to English Text", "Swedish Audio to English Text"])
demo.launch()