Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -240,13 +240,18 @@ def treeDemo():
|
|
240 |
- keep atleast 2 edges "animated":true.
|
241 |
- Strictly keep the all the nodes with type property value as custom.
|
242 |
- to edit edges add style with stroke property and a hexcode value to it(Only use this color: #e92a67, #a853ba, #2a8af6, #e92a67).
|
|
|
243 |
|
244 |
Topic is: ''' + query)
|
245 |
|
246 |
# response.text(8,)
|
247 |
print(response.text)
|
248 |
-
|
249 |
-
|
|
|
|
|
|
|
|
|
250 |
|
251 |
while True:
|
252 |
new_object_id = ObjectId()
|
@@ -381,7 +386,6 @@ def interview():
|
|
381 |
|
382 |
- It is required that the response should be an object. Don't include any other verbose explanations and don't include the markdown syntax anywhere.''')
|
383 |
print(response.text)
|
384 |
-
print(response.text)
|
385 |
temp = json.loads(response.text)
|
386 |
user_chats[user_id]['qa'] = [{'question': temp['question']}]
|
387 |
return jsonify({'success': True, 'data': response.text})
|
|
|
240 |
- keep atleast 2 edges "animated":true.
|
241 |
- Strictly keep the all the nodes with type property value as custom.
|
242 |
- to edit edges add style with stroke property and a hexcode value to it(Only use this color: #e92a67, #a853ba, #2a8af6, #e92a67).
|
243 |
+
- It is required that the response should be an object. Don't include any other verbose explanations and don't include the markdown syntax anywhere.
|
244 |
|
245 |
Topic is: ''' + query)
|
246 |
|
247 |
# response.text(8,)
|
248 |
print(response.text)
|
249 |
+
modified_json_data = {}
|
250 |
+
if response.text[0] == '`':
|
251 |
+
json_data = response.text
|
252 |
+
modified_json_data = json_data[8:-3]
|
253 |
+
elif response.text[0] == '{':
|
254 |
+
modified_json_data = json.loads(response.text)
|
255 |
|
256 |
while True:
|
257 |
new_object_id = ObjectId()
|
|
|
386 |
|
387 |
- It is required that the response should be an object. Don't include any other verbose explanations and don't include the markdown syntax anywhere.''')
|
388 |
print(response.text)
|
|
|
389 |
temp = json.loads(response.text)
|
390 |
user_chats[user_id]['qa'] = [{'question': temp['question']}]
|
391 |
return jsonify({'success': True, 'data': response.text})
|