alexkueck commited on
Commit
23a9c1c
·
1 Parent(s): dc43042

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -297,11 +297,10 @@ def generate(text, history, rag_option, model_option, temperature=0.5, max_new_
297
  "options": {"max_new_tokens": 1024},
298
  }
299
  response= requests.post(API_URL, headers=HEADERS, data=json.dumps(data))
300
- #result = response.json()
301
- #print("result:------------------")
302
- #print(result[0]['generated_text'])
303
- chatbot_response = response.json()[0]["generated_text"]
304
-
305
  except Exception as e:
306
  raise gr.Error(e)
307
 
 
297
  "options": {"max_new_tokens": 1024},
298
  }
299
  response= requests.post(API_URL, headers=HEADERS, data=json.dumps(data))
300
+ result = response.json()
301
+ print("result:------------------")
302
+ chatbot_response = result[0]['generated_text']
303
+ print(chatbot_response)
 
304
  except Exception as e:
305
  raise gr.Error(e)
306