Spaces:
Runtime error
Runtime error
Commit
·
1d4b58f
1
Parent(s):
ff1048e
Update app.py
Browse files
app.py
CHANGED
@@ -89,9 +89,11 @@ def classify_image(image):
|
|
89 |
max_value = max(results)
|
90 |
for i in range(len(results)):
|
91 |
if results[i] == max_value:
|
92 |
-
name = labels.get(i)
|
93 |
|
94 |
result_NLP = model_NLP.generate(f"{name} is able to", max_length=100)
|
|
|
|
|
95 |
return output, result_NLP
|
96 |
|
97 |
|
|
|
89 |
max_value = max(results)
|
90 |
for i in range(len(results)):
|
91 |
if results[i] == max_value:
|
92 |
+
name = labels.get(i).capitalize()
|
93 |
|
94 |
result_NLP = model_NLP.generate(f"{name} is able to", max_length=100)
|
95 |
+
index = result_NLP.find('.', 50)
|
96 |
+
result_NLP = result_NLP[0:index+1]
|
97 |
return output, result_NLP
|
98 |
|
99 |
|