NextAITeam's picture
Update app.py
14fa9f0 verified
Raw
History Blame Contribute Delete
427 Bytes
from transformers import pipeline
import gradio as gr
print("Loading model...")
classifier = pipeline(
"text-classification",
model="MTE313/NEXARA_Model"
)
print("Model loaded")
def predict(text):
return classifier(text)
print("Creating interface")
demo = gr.Interface(
fn=predict,
inputs="text",
outputs="json"
)
print("Launching")
demo.launch(
server_name="0.0.0.0",
server_port=7860
)