Spaces:
Runtime error
Runtime error
Made model and data private
Browse files- app.py +5 -2
- requirements.txt +1 -0
app.py
CHANGED
@@ -1,9 +1,12 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
3 |
|
|
|
|
|
4 |
model_checkpoint = "besijar/dspa_review_classification"
|
5 |
-
tokeniser = AutoTokenizer.from_pretrained(model_checkpoint)
|
6 |
-
model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint)
|
7 |
|
8 |
example_review = "Tully's House Blend is the perfect K-Cup for me. Sure, I occasionally enjoy the special flavors.....Mocha, Italian roast, French vanilla, but my favorite 'go-to'coffee is House Blend. Wakes me up in the morning with it's coffee house full hearty taste."
|
9 |
|
|
|
1 |
+
import os
|
2 |
import gradio as gr
|
3 |
from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
|
4 |
|
5 |
+
HF_TOKEN = os.environ.get('HF_TOKEN')
|
6 |
+
|
7 |
model_checkpoint = "besijar/dspa_review_classification"
|
8 |
+
tokeniser = AutoTokenizer.from_pretrained(model_checkpoint, use_auth_token=True)
|
9 |
+
model = TFAutoModelForSequenceClassification.from_pretrained(model_checkpoint, use_auth_token=True)
|
10 |
|
11 |
example_review = "Tully's House Blend is the perfect K-Cup for me. Sure, I occasionally enjoy the special flavors.....Mocha, Italian roast, French vanilla, but my favorite 'go-to'coffee is House Blend. Wakes me up in the morning with it's coffee house full hearty taste."
|
12 |
|
requirements.txt
CHANGED
@@ -1,2 +1,3 @@
|
|
|
|
1 |
transformers
|
2 |
tensorflow
|
|
|
1 |
+
python-dotenv
|
2 |
transformers
|
3 |
tensorflow
|