Sentiment-Bot / app.py
davoodwadi's picture
Upload app.py
f0059b4 verified
raw
history blame contribute delete
392 Bytes
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()