Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import socket
|
3 |
|
4 |
-
def
|
5 |
client_ip = request.client.host
|
6 |
local_ip = socket.gethostbyname(socket.gethostname())
|
7 |
return text, {"client_ip": client_ip, "local_ip": local_ip}
|
|
|
1 |
import gradio as gr
|
2 |
import socket
|
3 |
|
4 |
+
def predict(text, request: gr.Request):
|
5 |
client_ip = request.client.host
|
6 |
local_ip = socket.gethostbyname(socket.gethostname())
|
7 |
return text, {"client_ip": client_ip, "local_ip": local_ip}
|