AliArshad commited on
Commit
d03d02b
1 Parent(s): 545a4be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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
- model_path = 'https://huggingface.co/spaces/AliArshad/SeverityPrediction/blob/main/XLNet_model_project_Core.pt'
 
 
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):