My_Proxy / app.py
rr19tech's picture
Updated to pure gradio method
755df80 verified
Raw History Blame Contribute Delete
435 Bytes
import gradio as gr
def call_private_api(user_input: str) -> str:
# Your processing logic
return f"Processed query: {user_input}"
with gr.Blocks() as demo:
gr.Markdown("# Production API Server")
# Expose the logic safely to the Gradio pipeline architecture
gr.api(fn=call_private_api, api_name="call_private_api")
# Force execution via queue (Crucial for bypassing Edge updates)
demo.queue()
demo.launch()