Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -143,7 +143,7 @@ class NLP:
|
|
| 143 |
percent, score = self.__exec[model][1](review)
|
| 144 |
res = pd.DataFrame({'Rated 1/5': percent[0][0], 'Rated 2/5': percent[0][1], 'Rated 4/5': percent[0][2], 'Rated 5/5': percent[0][3]}, index=["Prediction"])
|
| 145 |
|
| 146 |
-
if (percent[0][0] == 0 and percent[
|
| 147 |
return (res, f"Model: {model}\nDataset: {Dataset}\nAccuracy: {str(float(score)*100)}\nDue to the size of the model, it has not been implemented on huggingface.")
|
| 148 |
else:
|
| 149 |
return (res, f"Model: {model}\nDataset: {Dataset}\nAccuracy: {str(float(score)*100)}")
|
|
|
|
| 143 |
percent, score = self.__exec[model][1](review)
|
| 144 |
res = pd.DataFrame({'Rated 1/5': percent[0][0], 'Rated 2/5': percent[0][1], 'Rated 4/5': percent[0][2], 'Rated 5/5': percent[0][3]}, index=["Prediction"])
|
| 145 |
|
| 146 |
+
if (percent[0][0] == 0 and percent[0][1] == 0):
|
| 147 |
return (res, f"Model: {model}\nDataset: {Dataset}\nAccuracy: {str(float(score)*100)}\nDue to the size of the model, it has not been implemented on huggingface.")
|
| 148 |
else:
|
| 149 |
return (res, f"Model: {model}\nDataset: {Dataset}\nAccuracy: {str(float(score)*100)}")
|