Spaces:
Runtime error
Runtime error
Commit
Β·
724e312
1
Parent(s):
674ce6a
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
pipe = pipeline("text-classification", model="qualitydatalab/autotrain-car-review-project-966432121")
|
5 |
|
6 |
def predict(text):
|
7 |
label2emoji = {"poor": "π", "ok": "π", "great": "π"}
|
8 |
-
preds = pipe(text)[0]
|
9 |
-
return label2emoji[
|
10 |
|
11 |
gradio_ui = gr.Interface(
|
12 |
fn=predict,
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
#pipe = pipeline("text-classification", model="qualitydatalab/autotrain-car-review-project-966432121")
|
5 |
|
6 |
def predict(text):
|
7 |
label2emoji = {"poor": "π", "ok": "π", "great": "π"}
|
8 |
+
#preds = pipe(text)[0]
|
9 |
+
return label2emoji["poor"], round(1, 5)
|
10 |
|
11 |
gradio_ui = gr.Interface(
|
12 |
fn=predict,
|