Spaces:
Runtime error
Runtime error
code update
Browse files
app.py
CHANGED
@@ -6,13 +6,17 @@ DEBUG_MODE = False
|
|
6 |
|
7 |
def echo(text, request: gr.Request):
|
8 |
output_text = {"report1": "SUCCESS"} # Initialize as a dictionary
|
9 |
-
output_text["report2"] = "You inserted the text:"
|
10 |
output_text["report3"] = text
|
11 |
if request:
|
12 |
# Convert headers to a dictionary and include them in the output_text
|
13 |
output_text["headers"] = dict(request.headers.items())
|
14 |
|
15 |
# Convert the output_text dictionary to a JSON-formatted string
|
|
|
|
|
|
|
|
|
|
|
16 |
output_text_json = json.dumps(output_text)
|
17 |
return output_text_json
|
18 |
|
|
|
6 |
|
7 |
def echo(text, request: gr.Request):
|
8 |
output_text = {"report1": "SUCCESS"} # Initialize as a dictionary
|
|
|
9 |
output_text["report3"] = text
|
10 |
if request:
|
11 |
# Convert headers to a dictionary and include them in the output_text
|
12 |
output_text["headers"] = dict(request.headers.items())
|
13 |
|
14 |
# Convert the output_text dictionary to a JSON-formatted string
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
output_text_json = json.dumps(output_text)
|
21 |
return output_text_json
|
22 |
|