nmcamacho commited on
Commit
42b62ad
Β·
verified Β·
1 Parent(s): 87bc1a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -10
app.py CHANGED
@@ -80,15 +80,26 @@ def contextual_pitch_assistant(csv_file, query):
80
  """
81
  return html
82
 
83
- app = gr.Interface(
84
- fn=contextual_pitch_assistant,
85
- inputs=[
86
- gr.File(label="Upload CRM CSV (5–100 rows)", file_types=[".csv"]),
87
- gr.Textbox(label="Sales Query", placeholder="e.g. Which clinic is best for our imaging subscription?")
88
- ],
89
- outputs=gr.HTML(label="Email Pitch Preview"),
90
- title="Contextual Pitch Assistant for Dental Sales",
91
- description="Upload CRM data and get a personalized contextual pitch with generated imagery."
92
- )
 
 
 
 
 
 
 
 
 
 
 
93
 
94
  app.launch()
 
80
  """
81
  return html
82
 
83
+ with gr.Blocks(title="Contextual Pitch Assistant for Dental Sales") as app:
84
+ gr.Markdown(
85
+ """
86
+ # 🦷 Contextual Pitch Assistant for Dental Sales
87
+ Upload a CRM file and ask a sales question β€” get a contextualized email pitch with a generated image.
88
+ """
89
+ )
90
+
91
+ with gr.Row():
92
+ with gr.Column(scale=1, min_width=300):
93
+ csv_file = gr.File(label="πŸ“‚ Upload CRM CSV (5–100 rows)", file_types=[".csv"])
94
+ query = gr.Textbox(
95
+ label="πŸ’¬ Sales Query",
96
+ placeholder="e.g. Which clinic is best for our imaging subscription?",
97
+ )
98
+ run_btn = gr.Button("πŸš€ Generate Pitch")
99
+ with gr.Column(scale=2):
100
+ output = gr.HTML(label="✨ Email Pitch Preview")
101
+
102
+ run_btn.click(fn=contextual_pitch_assistant, inputs=[csv_file, query], outputs=output)
103
+
104
 
105
  app.launch()