rr19tech commited on
Commit
3b5daee
·
verified ·
1 Parent(s): 6324eb5
Files changed (1) hide show
  1. app.py +3 -2
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
- return response.text
 
28
 
29
  # Simple UI to test it
30
- gr.Interface(fn=call_private_api, inputs="text", outputs="text").launch()
 
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()