Spaces:
Runtime error
Runtime error
File size: 392 Bytes
f0059b4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
import numpy as np
def get_sentiment(Review, satisfied):
# Get sentiment from LLM
if satisfied:
Sentiment = 'Positive'
else:
Sentiment = np.random.choice(['Positive', 'Negative'])
return Sentiment
demo = gr.Interface(fn=get_sentiment, inputs=["textbox", 'checkbox'], outputs="textbox")
if __name__ == "__main__":
demo.launch() |