File size: 388 Bytes
53f0ca0 5d32e83 53f0ca0 5d32e83 fe9264b 53f0ca0 5d32e83 53f0ca0 5d32e83 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import gradio as gr
from transformers import pipeline
# Load your model from Hugging Face
model_name = "HaryaniAnjali/Llama_3.2_Trained_Emotion"
classifier = pipeline("Emotion-Classification", model=model_name)
def classify_text(text):
return classifier(text)
# Create a Gradio interface
interface = gr.Interface(fn=classify_text, inputs="text", outputs="json")
interface.launch()
|