Spaces:
Sleeping
Sleeping
import gradio as gr | |
from transformers import pipeline | |
pipeline = pipeline(task="sentiment-analysis") | |
def predict(input_text): | |
predictions = pipeline(input_text) | |
return input_text, {p["label"]: p["score"] for p in predictions} | |
gradio_app = gr.Interface( | |
fn=predict, | |
inputs="text", | |
outputs="text", | |
title="ζθ½εζζ¬ηζ η»ͺδΊεη±»", | |
) | |
if __name__ == "__main__": | |
gradio_app.launch(share=True) |