Update app.py
Browse files
app.py
CHANGED
@@ -37,13 +37,13 @@ with demo:
|
|
37 |
practices, ensuring that AI Developers have a valuable and enjoyable tool at their disposal.""")
|
38 |
|
39 |
client_ip = request.client.host
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
|
48 |
with gr.Accordion("Chat with Top Models on the Leaderboard Here 💬", open=False):
|
49 |
# import pdb
|
|
|
37 |
practices, ensuring that AI Developers have a valuable and enjoyable tool at their disposal.""")
|
38 |
|
39 |
client_ip = request.client.host
|
40 |
+
local_ip = socket.gethostbyname(socket.gethostbyname(""))
|
41 |
+
x_forwarded_for = request.headers.get('x-forwarded-for')
|
42 |
+
headers = request.headers
|
43 |
+
if x_forwarded_for:
|
44 |
+
client_ip = x_forwarded_for
|
45 |
+
gr.Markdown(f"client ip: {client_ip}")
|
46 |
+
gr.Markdown(f"info: {x_forwarded_for}")
|
47 |
|
48 |
with gr.Accordion("Chat with Top Models on the Leaderboard Here 💬", open=False):
|
49 |
# import pdb
|