Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ sdg_dict = {
|
|
25 |
def predict(text):
|
26 |
preds = pipe(text)[0]
|
27 |
preds2 = pipe2(text)[0]
|
28 |
-
return sdg_dict[
|
29 |
##return sdg_dict[int(preds["label"][0])], str(round(preds["score"], 5)*100) + " %", sdg_dict[int(preds2["label"][0])], str(round(preds2["score"], 5)*100) + " %"
|
30 |
|
31 |
gradio_ui = gr.Interface(
|
|
|
25 |
def predict(text):
|
26 |
preds = pipe(text)[0]
|
27 |
preds2 = pipe2(text)[0]
|
28 |
+
return sdg_dict[preds["label"]], str(round(preds["score"], 5)*100) + " %",, preds2["label"], preds2["score"]
|
29 |
##return sdg_dict[int(preds["label"][0])], str(round(preds["score"], 5)*100) + " %", sdg_dict[int(preds2["label"][0])], str(round(preds2["score"], 5)*100) + " %"
|
30 |
|
31 |
gradio_ui = gr.Interface(
|