lllz / app.py
Docfile's picture
Create app.py
0a07732
raw
history blame
433 Bytes
import gradio as gr
import requests
url = "https://app.embedchain.ai/api/v1/pipelines/f14b3df8-db63-456c-8a7f-4323b4467271/context/"
def greet(name):
payload = {
"query": f"{name}",
"count": 5
}
headers = {…}
response = requests.request("POST", url, headers=headers, json=payload)
print(name)
return response.text
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()