File size: 408 Bytes
ff33821 4a4f909 ff33821 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import gradio as gr
import requests
def fucntion(prompt):
response = requests.post("https://tommy24-testing45.hf.space/run/predict", json={
"data": [
prompt,
]
}).json()
data = response["data"][0]["name"]
data = "https://tommy24-testing45.hf.space/file=" + data
return data
iface = gr.Interface(fn=fucntion, inputs="text", outputs="text")
iface.launch() |