Spaces:
Runtime error
Runtime error
import gradio as gr | |
project = hopsworks.login() | |
fs = project.get_feature_store() | |
dataset_api = project.get_dataset_api() | |
def article_selection(sentiment): | |
if sentiment == "Positive": | |
return f"""The sentence you requested is Positive!""" | |
else sentiment == "Negative": | |
return f"""The sentence you requested is Positive!""" | |
else sentiment == "Neutral": | |
return f"""The sentence you requested is Positive!""" | |
demo = gr.Interface( | |
fn=article_selection, | |
inputs = gr.inputs.Dropdown(["Positive","Negative","Neutral"]) | |
#outputs = [gr.outputs.Textbox(label="Sentiment Prediction")], | |
) | |
#TODO | |
#demo = gr.TabbedInterface([url_demo, voice_demo], ["Swedish YouTube Video to English Text", "Swedish Audio to English Text"]) | |
demo.launch() |