Spaces:
Runtime error
Runtime error
2 inputs workibg
Browse files
app.py
CHANGED
|
@@ -9,9 +9,11 @@ DEBUG_MODE = False
|
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
-
def echo(text, request: gr.Request):
|
| 13 |
output_text = {"report1": "SUCCESS"} # Initialize as a dictionary
|
| 14 |
output_text["report3"] = text
|
|
|
|
|
|
|
| 15 |
if request:
|
| 16 |
# Convert headers to a dictionary and include them in the output_text
|
| 17 |
output_text["headers"] = dict(request.headers.items())
|
|
@@ -20,4 +22,4 @@ def echo(text, request: gr.Request):
|
|
| 20 |
output_text_json = json.dumps(output_text)
|
| 21 |
return output_text_json
|
| 22 |
|
| 23 |
-
io = gr.Interface(echo, "textarea", "json").launch(share=True)
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
+
def echo(text, lang, request: gr.Request):
|
| 13 |
output_text = {"report1": "SUCCESS"} # Initialize as a dictionary
|
| 14 |
output_text["report3"] = text
|
| 15 |
+
|
| 16 |
+
|
| 17 |
if request:
|
| 18 |
# Convert headers to a dictionary and include them in the output_text
|
| 19 |
output_text["headers"] = dict(request.headers.items())
|
|
|
|
| 22 |
output_text_json = json.dumps(output_text)
|
| 23 |
return output_text_json
|
| 24 |
|
| 25 |
+
io = gr.Interface(echo, ["textarea", "textbox"], "json").launch(share=True)
|