Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -183,12 +183,15 @@ def read_email():
|
|
183 |
output = llm(prompt_, max_tokens=1000, temperature=0.1)
|
184 |
print("*"*50)
|
185 |
t = output['choices'][0]['text']
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
192 |
# print(extracted_details)
|
193 |
print(type(extracted_details))
|
194 |
meta_data = {
|
|
|
183 |
output = llm(prompt_, max_tokens=1000, temperature=0.1)
|
184 |
print("*"*50)
|
185 |
t = output['choices'][0]['text']
|
186 |
+
if len(t)==o:
|
187 |
+
print('input : ',i)
|
188 |
+
print('output : ',t)
|
189 |
+
# t = t[t.find('json\n')+len('json\n'):]
|
190 |
+
extracted_details = json.loads(t)
|
191 |
+
else:
|
192 |
+
continue
|
193 |
+
|
194 |
+
print(extracted_details
|
195 |
# print(extracted_details)
|
196 |
print(type(extracted_details))
|
197 |
meta_data = {
|