Spaces:
Sleeping
Sleeping
Chillyblast
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import streamlit as st
|
2 |
import torch
|
3 |
-
from transformers import
|
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 =
|
25 |
-
model =
|
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()
|