Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from transformers import pipeline | |
| classifier = pipeline("text-classification", model="karimmohamed19/final") | |
| def classify(text): | |
| result = classifier(text) | |
| return result[0]['label'] | |
| iface = gr.Interface(fn=classify, inputs="text", outputs="text") | |
| iface.launch() | |