Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,10 @@ from transformers import AutoModelForSequenceClassification, AutoTokenizer
|
|
3 |
import gradio as gr
|
4 |
|
5 |
# Path to the saved model in Hugging Face Spaces
|
6 |
-
|
|
|
|
|
7 |
|
8 |
-
# Load the model and tokenizer
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained('xlnet-base-cased')
|
10 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_path)
|
11 |
|
12 |
# Function for prediction
|
13 |
def xl_net_predict(text):
|
|
|
3 |
import gradio as gr
|
4 |
|
5 |
# Path to the saved model in Hugging Face Spaces
|
6 |
+
model_name = 'AliArshad/SeverityPrediction' # Replace with your actual username and model name
|
7 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
8 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
9 |
|
|
|
|
|
|
|
10 |
|
11 |
# Function for prediction
|
12 |
def xl_net_predict(text):
|