Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ import gradio as gr
|
|
| 4 |
model_path = "indiaai-text-classification-model"
|
| 5 |
model = BertForSequenceClassification.from_pretrained(model_path)
|
| 6 |
tokenizer = BertTokenizerFast.from_pretrained(model_path)
|
| 7 |
-
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer
|
| 8 |
|
| 9 |
def classify_text(input_text):
|
| 10 |
result = nlp(input_text)
|
|
|
|
| 4 |
model_path = "indiaai-text-classification-model"
|
| 5 |
model = BertForSequenceClassification.from_pretrained(model_path)
|
| 6 |
tokenizer = BertTokenizerFast.from_pretrained(model_path)
|
| 7 |
+
nlp = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
|
| 8 |
|
| 9 |
def classify_text(input_text):
|
| 10 |
result = nlp(input_text)
|