strongpear
commited on
Commit
•
abd24db
1
Parent(s):
be1a509
update display option
Browse files
app.py
CHANGED
@@ -195,7 +195,7 @@ class inferSSCL():
|
|
195 |
|
196 |
return s
|
197 |
|
198 |
-
def get_predict(self, top_pred, aspect_label, threshold=
|
199 |
pred = {'none':0, 'do_an': 0, 'gia_ca':0, 'khong_gian': 0, 'phuc_vu': 0}
|
200 |
try:
|
201 |
for i in range(len(top_pred)):
|
@@ -274,4 +274,13 @@ else:
|
|
274 |
outputs = model.output[0]
|
275 |
if outputs:
|
276 |
for output in outputs:
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
|
196 |
return s
|
197 |
|
198 |
+
def get_predict(self, top_pred, aspect_label, threshold=3):
|
199 |
pred = {'none':0, 'do_an': 0, 'gia_ca':0, 'khong_gian': 0, 'phuc_vu': 0}
|
200 |
try:
|
201 |
for i in range(len(top_pred)):
|
|
|
274 |
outputs = model.output[0]
|
275 |
if outputs:
|
276 |
for output in outputs:
|
277 |
+
if output == 'do_an':
|
278 |
+
st.title('Đồ ăn')
|
279 |
+
elif output == 'gia_ca':
|
280 |
+
st.title('Giá cả')
|
281 |
+
elif output == 'khong_gian':
|
282 |
+
st.title('Không gian')
|
283 |
+
elif output == 'phuc_vu':
|
284 |
+
st.title('Phục vụ')
|
285 |
+
else:
|
286 |
+
st.title('None')
|