Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
@@ -67,8 +67,8 @@ def summary(input_json):
|
|
67 |
|
68 |
prompt = pd.read_excel('DescriptorPrompt.xlsx')
|
69 |
promptShort = prompt.iloc[:,1].to_list()
|
70 |
-
promptLong = prompt.iloc[:,2].to_list()
|
71 |
-
|
72 |
output = {}
|
73 |
filtering_results = filter(input_json)
|
74 |
if filtering_results[0] == 0:
|
@@ -89,7 +89,7 @@ def summary(input_json):
|
|
89 |
answer = callAzure(promptShort[id], long_text)
|
90 |
output['Short Summary'] = answer
|
91 |
|
92 |
-
answer = callAzure(promptLong[id], long_text)
|
93 |
output['Long summary'] = answer
|
94 |
|
95 |
prompt = "Answer in 1 word Financial SEO tag for this news article"
|
|
|
67 |
|
68 |
prompt = pd.read_excel('DescriptorPrompt.xlsx')
|
69 |
promptShort = prompt.iloc[:,1].to_list()
|
70 |
+
promptLong = prompt.iloc[:,2].to_list()
|
71 |
+
|
72 |
output = {}
|
73 |
filtering_results = filter(input_json)
|
74 |
if filtering_results[0] == 0:
|
|
|
89 |
answer = callAzure(promptShort[id], long_text)
|
90 |
output['Short Summary'] = answer
|
91 |
|
92 |
+
answer = callAzure(promptLong[id] + " The Summary should be around 2000 characters. Please make sure it is not smaller than that", long_text)
|
93 |
output['Long summary'] = answer
|
94 |
|
95 |
prompt = "Answer in 1 word Financial SEO tag for this news article"
|