Spaces:
Runtime error
Runtime error
Update helpers.py
Browse files- helpers.py +4 -4
helpers.py
CHANGED
@@ -208,14 +208,14 @@ def define_metadata(input_text):
|
|
208 |
#cond1 cond2 la str, con3 la list ten cac nganh
|
209 |
result = {}
|
210 |
if condition3 in input_text:
|
211 |
-
result[
|
212 |
elif condition1 in input_text:
|
213 |
-
result[
|
214 |
elif condition2 in input_text:
|
215 |
-
result[
|
216 |
for cond in condition4:
|
217 |
if cond in input_text:
|
218 |
-
result[
|
219 |
return result
|
220 |
|
221 |
def update_documents_metadata(documents, new_metadata):
|
|
|
208 |
#cond1 cond2 la str, con3 la list ten cac nganh
|
209 |
result = {}
|
210 |
if condition3 in input_text:
|
211 |
+
result['Tai lieu ve'] = 'Đề cương'
|
212 |
elif condition1 in input_text:
|
213 |
+
result['Tai lieu ve'] = 'Chương trình đào tạo'
|
214 |
elif condition2 in input_text:
|
215 |
+
result['Tai lieu ve'] = 'Đề án'
|
216 |
for cond in condition4:
|
217 |
if cond in input_text:
|
218 |
+
result['Nganh'] = cond
|
219 |
return result
|
220 |
|
221 |
def update_documents_metadata(documents, new_metadata):
|