Spaces:
Sleeping
Sleeping
aakarsh-yadav-tcgls
commited on
Commit
•
daa3b24
1
Parent(s):
153bf06
setting up api calling
Browse files
app.py
CHANGED
@@ -15,6 +15,11 @@ def query(payload):
|
|
15 |
response = requests.post(API_URL, headers=headers, json=payload)
|
16 |
return response.json()
|
17 |
|
18 |
-
output = query(input_data)
|
19 |
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
response = requests.post(API_URL, headers=headers, json=payload)
|
16 |
return response.json()
|
17 |
|
|
|
18 |
|
19 |
+
def predict(text):
|
20 |
+
output = query({"inputs": text})
|
21 |
+
return output
|
22 |
+
|
23 |
+
|
24 |
+
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
|
25 |
+
iface.launch()
|