Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from clean_data import cleaned_complaints
|
|
4 |
import numpy as np
|
5 |
from scipy.special import softmax
|
6 |
import gradio as gr
|
|
|
7 |
|
8 |
# Preprocess text (username and link placeholders)
|
9 |
def preprocess(text):
|
@@ -16,7 +17,8 @@ def preprocess(text):
|
|
16 |
|
17 |
# load model
|
18 |
MODEL = f"ThirdEyeData/Complaints_Roberta"
|
19 |
-
model =
|
|
|
20 |
#model.save_pretrained(MODEL)
|
21 |
|
22 |
|
|
|
4 |
import numpy as np
|
5 |
from scipy.special import softmax
|
6 |
import gradio as gr
|
7 |
+
from transformers import PegasusForConditionalGeneration
|
8 |
|
9 |
# Preprocess text (username and link placeholders)
|
10 |
def preprocess(text):
|
|
|
17 |
|
18 |
# load model
|
19 |
MODEL = f"ThirdEyeData/Complaints_Roberta"
|
20 |
+
model = PegasusForConditionalGeneration.from_pretrained(MODEL)
|
21 |
+
#model = AutoModelForSequenceClassification.from_pretrained(MODEL)
|
22 |
#model.save_pretrained(MODEL)
|
23 |
|
24 |
|