File size: 392 Bytes
ff33821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr

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()