Chillyblast commited on
Commit
801b717
·
verified ·
1 Parent(s): 1d5a90b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import streamlit as st
2
  import torch
3
- from transformers import RobertaTokenizer, RobertaForSequenceClassification
4
  from datasets import load_dataset, Dataset
5
  import pandas as pd
6
 
@@ -21,8 +21,8 @@ df['label'] = df['intent'].map(label2id)
21
  df = df[['instruction', 'label', 'intent', 'response']]
22
 
23
  # Load the tokenizer and model
24
- tokenizer = RobertaTokenizer.from_pretrained('roberta-base')
25
- model = RobertaForSequenceClassification.from_pretrained('path_to_your_saved_model_directory')
26
 
27
  # Ensure the model is in evaluation mode
28
  model.eval()
 
1
  import streamlit as st
2
  import torch
3
+ from transformers import AutoTokenizer, AutoModelForSequenceClassification
4
  from datasets import load_dataset, Dataset
5
  import pandas as pd
6
 
 
21
  df = df[['instruction', 'label', 'intent', 'response']]
22
 
23
  # Load the tokenizer and model
24
+ tokenizer = AutoTokenizer.from_pretrained("Chillyblast/Roberta_Question_Answer")
25
+ model = AutoModelForSequenceClassification.from_pretrained("Chillyblast/Roberta_Question_Answer")
26
 
27
  # Ensure the model is in evaluation mode
28
  model.eval()