Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def answering(text):
|
|
16 |
percentage = learner_inf.blurr_predict(text)[0]['score']* 100
|
17 |
index = learner_inf.blurr_predict(text)[0]['class_index']
|
18 |
label = learner_inf.blurr_predict(text)[0]['class_labels'][index]
|
19 |
-
result =
|
20 |
if percentage >= 35:
|
21 |
return result.iloc[0]
|
22 |
else:
|
|
|
16 |
percentage = learner_inf.blurr_predict(text)[0]['score']* 100
|
17 |
index = learner_inf.blurr_predict(text)[0]['class_index']
|
18 |
label = learner_inf.blurr_predict(text)[0]['class_labels'][index]
|
19 |
+
result = df[df['label'] == label]['answer']
|
20 |
if percentage >= 35:
|
21 |
return result.iloc[0]
|
22 |
else:
|