File size: 304 Bytes
77009a0
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
import requests
def greet(name='World'):
    url = 'http://localhost:8000/'
    raw_response = requests.get(url)
    return raw_response.text

import subprocess 
subprocess.Popen("python api.py", shell=True)

demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()