Updated
Browse files
app.py
CHANGED
|
@@ -24,7 +24,8 @@ def call_private_api(user_input):
|
|
| 24 |
headers=headers,
|
| 25 |
params={"text": user_input} # 'q' is the name FastAPI expects in the URL
|
| 26 |
)
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
# Simple UI to test it
|
| 30 |
-
gr.Interface(fn=call_private_api, inputs="text", outputs="
|
|
|
|
| 24 |
headers=headers,
|
| 25 |
params={"text": user_input} # 'q' is the name FastAPI expects in the URL
|
| 26 |
)
|
| 27 |
+
print(response.status_code)
|
| 28 |
+
return response.json()
|
| 29 |
|
| 30 |
# Simple UI to test it
|
| 31 |
+
gr.Interface(fn=call_private_api, inputs="text", outputs="json").launch()
|