Karim-Gamal commited on
Commit
b95f7c9
·
1 Parent(s): 904c757

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -129,8 +129,12 @@ def _method(text):
129
  # handle the case where output_temp is empty
130
  output_dict = {}
131
 
132
- input_list = list(output_dict.items())[:3]
 
133
 
 
 
 
134
  output_dict = {key: value for key, value in input_list}
135
 
136
  return output_dict
@@ -192,7 +196,11 @@ def _method(text):
192
  # handle the case where output_temp is empty
193
  output_dict = {}
194
 
195
- input_list = list(output_dict.items())[:3]
 
 
 
 
196
 
197
  output_dict = {key: value for key, value in input_list}
198
 
 
129
  # handle the case where output_temp is empty
130
  output_dict = {}
131
 
132
+ try:
133
+ input_list = list(output_dict.items())[:3]
134
 
135
+ except:
136
+ pass
137
+
138
  output_dict = {key: value for key, value in input_list}
139
 
140
  return output_dict
 
196
  # handle the case where output_temp is empty
197
  output_dict = {}
198
 
199
+ try:
200
+ input_list = list(output_dict.items())[:3]
201
+
202
+ except:
203
+ pass
204
 
205
  output_dict = {key: value for key, value in input_list}
206