dwb2023 commited on
Commit
66ac839
·
verified ·
1 Parent(s): 3aaf946

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py CHANGED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py
2
+
3
+ import gradio as gr
4
+ import subprocess
5
+
6
+ def chat_with_support(input_text):
7
+ process = subprocess.Popen(
8
+ ["python3", "function_orchestrator.py"],
9
+ stdin=subprocess.PIPE,
10
+ stdout=subprocess.PIPE,
11
+ stderr=subprocess.PIPE,
12
+ text=True
13
+ )
14
+ stdout, stderr = process.communicate(input=input_text)
15
+ return stdout
16
+
17
+ iface = gr.Interface(
18
+ fn=chat_with_support,
19
+ inputs="text",
20
+ outputs="text",
21
+ title="TechNova Support Chat",
22
+ description="Chat with TechNova support bot to manage your orders and account."
23
+ )
24
+
25
+ iface.launch()