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