tanhm07@hotmail.com commited on
Commit ·
d6ce871
1
Parent(s): 13686b9
first commit
Browse files- app.py +23 -0
- requirements.txt +1 -0
app.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def run_agent(system_prompt, email):
|
| 4 |
+
return f"System Prompt:\n{system_prompt}\n\nEmail:\n{email}"
|
| 5 |
+
|
| 6 |
+
with gr.Blocks() as demo:
|
| 7 |
+
with gr.Row():
|
| 8 |
+
with gr.Column():
|
| 9 |
+
gr.Markdown("## Agent Builder")
|
| 10 |
+
system_prompt = gr.Textbox(label="System Prompt", lines=15)
|
| 11 |
+
|
| 12 |
+
with gr.Column():
|
| 13 |
+
gr.Markdown("## Email Input")
|
| 14 |
+
email = gr.Textbox(label="Email", lines=15)
|
| 15 |
+
|
| 16 |
+
with gr.Column():
|
| 17 |
+
gr.Markdown("## Output")
|
| 18 |
+
output = gr.Textbox(label="Result", lines=15)
|
| 19 |
+
|
| 20 |
+
run_btn = gr.Button("Run Agent")
|
| 21 |
+
run_btn.click(run_agent, inputs=[system_prompt, email], outputs=output)
|
| 22 |
+
|
| 23 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio
|