Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -97,9 +97,9 @@ class Chatbot:
|
|
97 |
|
98 |
#hostname = socket.gethostname() # this returns server hostname
|
99 |
#ip = socket.gethostbyname(hostname)
|
100 |
-
|
101 |
-
|
102 |
-
|
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 |
-
|
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 |
}
|