Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,3 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from transformers import pipeline
|
| 3 |
-
|
| 4 |
-
# Load your model from Hugging Face
|
| 5 |
-
model_name = "HaryaniAnjali/Llama_3.2_Trained_Emotion"
|
| 6 |
-
classifier = pipeline("Emotion-Classification", model=model_name)
|
| 7 |
-
|
| 8 |
-
def classify_text(text):
|
| 9 |
-
return classifier(text)
|
| 10 |
-
|
| 11 |
-
# Create a Gradio interface
|
| 12 |
-
interface = gr.Interface(fn=classify_text, inputs="text", outputs="json")
|
| 13 |
-
interface.launch()
|
| 14 |
-
|
| 15 |
-
|
| 16 |
import gradio as gr
|
| 17 |
import torch
|
| 18 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import torch
|
| 3 |
from transformers import AutoModelForSequenceClassification, AutoTokenizer
|