libokj commited on
Commit
621bfc1
·
verified ·
1 Parent(s): 6520527

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -29,13 +29,16 @@ def predict(text, request: gr.Request):
29
  # Get the current timestamp and convert it to the user's local time
30
  timestamp = datetime.now().timestamp()
31
  current_time_local = ts_to_str(timestamp, timezone_str)
 
 
32
 
33
- return {
34
  "ip": ip_address,
35
  "user_agent": request.headers["user-agent"],
36
  "current_time_local": current_time_local,
37
  "timezone": timezone_str
38
  }
 
39
 
40
  demo = gr.Interface(fn=predict, inputs="text", outputs="json")
41
  demo.launch()
 
29
  # Get the current timestamp and convert it to the user's local time
30
  timestamp = datetime.now().timestamp()
31
  current_time_local = ts_to_str(timestamp, timezone_str)
32
+
33
+ import pdb; pdb.set_trace()
34
 
35
+ info = {
36
  "ip": ip_address,
37
  "user_agent": request.headers["user-agent"],
38
  "current_time_local": current_time_local,
39
  "timezone": timezone_str
40
  }
41
+ return info
42
 
43
  demo = gr.Interface(fn=predict, inputs="text", outputs="json")
44
  demo.launch()