Yusin commited on
Commit
d21df32
1 Parent(s): 69b01bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -54,15 +54,10 @@ def chat_hf(audio, custom_token, language):
54
  data = {"content": whisper_text}
55
  print(data)
56
  detect_port('93.56.204.222', 7788)
57
- try:
58
- telnetlib.Telnet(host='93.56.204.222', port='7788', timeout=2)
59
- print(f"{port} 端口开放")
60
- except:
61
- print(f"{port} 端口未开放")
62
  #res = requests.get('http://myip.ipip.net', timeout=5).text
63
  #print(res)
64
  response = requests.post('http://93.56.204.222:7788/api/ask', headers=headers, json=data)
65
- print(response.text)
66
  chat_id['parent_id'] = response.json()["response_id"]
67
  chat_id['conversation_id'] = response.json()["conversation_id"]
68
  gpt_response = response.json()["content"]
 
54
  data = {"content": whisper_text}
55
  print(data)
56
  detect_port('93.56.204.222', 7788)
 
 
 
 
 
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)
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"]
63
  gpt_response = response.json()["content"]