Spaces:
Running
Running
| import gradio as gr | |
| from detect import predict_sentiment | |
| def classify_text(text): | |
| return predict_sentiment(text) | |
| demo = gr.Interface( | |
| fn=classify_text, | |
| inputs=gr.Textbox(lines=2, placeholder="Enter Japanese text here..."), | |
| outputs="text", | |
| title="Japanese Sentiment Classifier", | |
| description="Classifies Japanese text as Positive π or Negative π‘ using a PyTorch model trained from scratch." | |
| ) | |
| demo.launch(share=True) | |