zlmqi commited on
Commit
224d9a3
1 Parent(s): d141288

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -97,9 +97,9 @@ class Chatbot:
97
 
98
  #hostname = socket.gethostname() # this returns server hostname
99
  #ip = socket.gethostbyname(hostname)
100
- # client_socket = socket.socket()
101
- # client_socket.connect(("huggingface.co",80))
102
- # ip = client_socket.getpeername()[0]
103
  #print(ip)
104
 
105
  #self.chat_history.append({"role": "datetime", "content": dt})
@@ -110,7 +110,7 @@ class Chatbot:
110
  # save the data in dictionary format
111
  dictionary = {
112
  "datetime": dt,
113
- # "ip": ip,
114
  "user": user_input,
115
  "assistant": output
116
  }
 
97
 
98
  #hostname = socket.gethostname() # this returns server hostname
99
  #ip = socket.gethostbyname(hostname)
100
+ client_socket = socket.socket()
101
+ client_socket.connect(("huggingface.co",80))
102
+ ip = client_socket.getpeername()[0]
103
  #print(ip)
104
 
105
  #self.chat_history.append({"role": "datetime", "content": dt})
 
110
  # save the data in dictionary format
111
  dictionary = {
112
  "datetime": dt,
113
+ "ip": ip,
114
  "user": user_input,
115
  "assistant": output
116
  }