Yusin commited on
Commit
96a6898
1 Parent(s): 28a52e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,6 +12,7 @@ import os
12
  import json
13
  import requests
14
  #session_token = os.environ.get('SessionToken')
 
15
  # ChatGPT
16
  #from revChatGPT.ChatGPT import Chatbot
17
  #chatbot = Chatbot({"session_token": session_token}) # You can start a custom conversation
@@ -56,7 +57,7 @@ def chat_hf(audio, custom_token, language):
56
  print(data)
57
  res = requests.get('http://myip.ipip.net', timeout=5).text
58
  print(res)
59
- response = requests.post('http://93.56.204.222:7788/api/ask', headers=headers, json=data, verify=False, timeout=5)
60
  print('this is my answear', response.text)
61
  chat_id['parent_id'] = response.json()["response_id"]
62
  chat_id['conversation_id'] = response.json()["conversation_id"]
 
12
  import json
13
  import requests
14
  #session_token = os.environ.get('SessionToken')
15
+ api_endpoint = os.environ.get('API_EndPoint')
16
  # ChatGPT
17
  #from revChatGPT.ChatGPT import Chatbot
18
  #chatbot = Chatbot({"session_token": session_token}) # You can start a custom conversation
 
57
  print(data)
58
  res = requests.get('http://myip.ipip.net', timeout=5).text
59
  print(res)
60
+ response = requests.post('api_endpoint', headers=headers, json=data, verify=False, timeout=5)
61
  print('this is my answear', response.text)
62
  chat_id['parent_id'] = response.json()["response_id"]
63
  chat_id['conversation_id'] = response.json()["conversation_id"]