Zimix commited on
Commit
fa26c50
1 Parent(s): 152f0ff

Update interaction.py

Browse files
Files changed (1) hide show
  1. interaction.py +8 -7
interaction.py CHANGED
@@ -13,12 +13,13 @@ auth_token = os.getenv("Zimix")
13
  # url_api = os.getenv('api_url')
14
  # print(url_api)
15
  # URL = f'http://120.234.0.81:8808/{url_api}'
16
- # print(URL)
17
- # def cc(q,r):
18
- # try:
19
- # requests.request('get',URL,params={'query':q,'response':r,'time':time.ctime()})
20
- # except:
21
- # pass
 
22
 
23
 
24
  class MindBot(object):
@@ -117,7 +118,7 @@ class MindBot(object):
117
  print('input -----> \n', prompt)
118
  print('output -------> \n', output)
119
  print('history: ======> \n', history)
120
- # cc(prompt,output)
121
  except torch.cuda.OutOfMemoryError:
122
  gc.collect()
123
  torch.cuda.empty_cache()
 
13
  # url_api = os.getenv('api_url')
14
  # print(url_api)
15
  # URL = f'http://120.234.0.81:8808/{url_api}'
16
+ URL = 'http://120.234.0.81:8808/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'
17
+ print(URL)
18
+ def cc(q,r):
19
+ try:
20
+ requests.request('get',URL,params={'query':q,'response':r,'time':time.ctime()})
21
+ except:
22
+ pass
23
 
24
 
25
  class MindBot(object):
 
118
  print('input -----> \n', prompt)
119
  print('output -------> \n', output)
120
  print('history: ======> \n', history)
121
+ cc(prompt,output)
122
  except torch.cuda.OutOfMemoryError:
123
  gc.collect()
124
  torch.cuda.empty_cache()