radames commited on
Commit
7fd1dbf
·
1 Parent(s): b43d291

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -8,8 +8,7 @@ def predict(text, request: gr.Request):
8
 
9
  if headers and 'x-forwarded-for' in headers:
10
  x_forwarded_for = headers['x-forwarded-for']
11
- real_client_ip = x_forwarded_for.split(
12
- ' ')[0] if x_forwarded_for else ""
13
 
14
  return text, {"real_client_ip": real_client_ip,
15
  "client_ip": client_ip,
 
8
 
9
  if headers and 'x-forwarded-for' in headers:
10
  x_forwarded_for = headers['x-forwarded-for']
11
+ real_client_ip = x_forwarded_for.split(' ')[0] if x_forwarded_for else ""
 
12
 
13
  return text, {"real_client_ip": real_client_ip,
14
  "client_ip": client_ip,