Spaces:
Runtime error
Runtime error
| 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() |