Spaces:
Build error
Build error
Olivier-Truong
commited on
Commit
•
1f983bd
1
Parent(s):
90959c1
Update app.py
Browse files
app.py
CHANGED
@@ -32,8 +32,17 @@ document.body.appendChild(par);
|
|
32 |
|
33 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, request: gr.Request):
|
34 |
try:
|
35 |
-
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
except Exception as e:
|
38 |
print(e)
|
39 |
if agree == True:
|
|
|
32 |
|
33 |
def predict(prompt, language, audio_file_pth, mic_file_path, use_mic, agree, request: gr.Request):
|
34 |
try:
|
35 |
+
if request:
|
36 |
+
print(request)
|
37 |
+
print(request.headers)
|
38 |
+
print("= = = = = = = = = = = =")
|
39 |
+
print()
|
40 |
+
print("Request headers dictionary:", request.headers)
|
41 |
+
print("IP address:", request.client.host)
|
42 |
+
print("Query parameters:", dict(request.query_params))
|
43 |
+
print()
|
44 |
+
else:
|
45 |
+
print("no such Request..")
|
46 |
except Exception as e:
|
47 |
print(e)
|
48 |
if agree == True:
|