Spaces:
Runtime error
Runtime error
Commit
·
1445063
1
Parent(s):
eb85f71
Minor correction
Browse files
app.py
CHANGED
@@ -43,7 +43,7 @@ def classify_by_company(text):
|
|
43 |
companies = "/" + companies + "/gm"
|
44 |
|
45 |
if re.search(companies, text):
|
46 |
-
return filename[:-4] + " -
|
47 |
|
48 |
return ""
|
49 |
|
@@ -108,7 +108,7 @@ def run_models(parameters_list):
|
|
108 |
out_classification = company_classification
|
109 |
else:
|
110 |
classification = pipeline("zero-shot-classification", model=zeroshot_map[parameters_list[2]], tokenizer=zeroshot_map[parameters_list[2]], device=device_num)
|
111 |
-
out_classification = classification(out_translation, candidate_labels)["labels"][0] + " -
|
112 |
|
113 |
out_translation += " - Translated by {}".format(parameters_list[0])
|
114 |
out_sentiment += " - Analyzed by {}".format(parameters_list[1])
|
|
|
43 |
companies = "/" + companies + "/gm"
|
44 |
|
45 |
if re.search(companies, text):
|
46 |
+
return filename[:-4] + " - Inferred by company name in text"
|
47 |
|
48 |
return ""
|
49 |
|
|
|
108 |
out_classification = company_classification
|
109 |
else:
|
110 |
classification = pipeline("zero-shot-classification", model=zeroshot_map[parameters_list[2]], tokenizer=zeroshot_map[parameters_list[2]], device=device_num)
|
111 |
+
out_classification = classification(out_translation, candidate_labels)["labels"][0] + " - Inferred by {}".format(parameters_list[2])
|
112 |
|
113 |
out_translation += " - Translated by {}".format(parameters_list[0])
|
114 |
out_sentiment += " - Analyzed by {}".format(parameters_list[1])
|