Spaces:
Sleeping
Sleeping
File size: 586 Bytes
66ac839 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# app.py
import gradio as gr
import subprocess
def chat_with_support(input_text):
process = subprocess.Popen(
["python3", "function_orchestrator.py"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True
)
stdout, stderr = process.communicate(input=input_text)
return stdout
iface = gr.Interface(
fn=chat_with_support,
inputs="text",
outputs="text",
title="TechNova Support Chat",
description="Chat with TechNova support bot to manage your orders and account."
)
iface.launch()
|