eduardo-alvarez
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import requests
|
|
|
4 |
|
5 |
|
6 |
from info.train_a_model import (
|
@@ -36,9 +37,9 @@ with demo:
|
|
36 |
team for generously sharing their code and best
|
37 |
practices, ensuring that AI Developers have a valuable and enjoyable tool at their disposal.""")
|
38 |
|
39 |
-
client_ip =
|
40 |
local_ip = socket.gethostbyname(socket.gethostbyname(""))
|
41 |
-
x_forwarded_for =
|
42 |
headers = request.headers
|
43 |
if x_forwarded_for:
|
44 |
client_ip = x_forwarded_for
|
|
|
1 |
import gradio as gr
|
2 |
import pandas as pd
|
3 |
import requests
|
4 |
+
import socket
|
5 |
|
6 |
|
7 |
from info.train_a_model import (
|
|
|
37 |
team for generously sharing their code and best
|
38 |
practices, ensuring that AI Developers have a valuable and enjoyable tool at their disposal.""")
|
39 |
|
40 |
+
client_ip = gr.Request.client.host
|
41 |
local_ip = socket.gethostbyname(socket.gethostbyname(""))
|
42 |
+
x_forwarded_for = gr.Request.headers.get('x-forwarded-for')
|
43 |
headers = request.headers
|
44 |
if x_forwarded_for:
|
45 |
client_ip = x_forwarded_for
|