Sanjayraju30 commited on
Commit
ace68bc
·
verified ·
1 Parent(s): eccf433

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -5
app.py CHANGED
@@ -53,11 +53,11 @@ def calculate_confidence(ai_score):
53
  def calculate_risk(ai_score, confidence, emails, meetings):
54
  # Make sure to map the value to the Salesforce picklist options
55
  if ai_score > 0.75 and confidence > 75:
56
- return "Low" # Update to match Salesforce picklist value
57
  elif ai_score > 0.5:
58
- return "Medium" # Assuming "Medium" is another valid value
59
  else:
60
- return "High" # Update to match Salesforce picklist value
61
 
62
  def generate_recommendation(stage, emails, meetings, risk):
63
  # Example recommendation generation
@@ -117,8 +117,20 @@ def run_engine(amount, stage, industry, emails, meetings, close_gap, feedback=""
117
 
118
  # Gradio UI
119
  with gr.Blocks(title="AI Deal Qualification Engine") as app:
120
- gr.Markdown("""
121
- <h1 style="text-align:center;">🤖 AI-Powered Deal Qualification Engine</h1>
 
 
 
 
 
 
 
 
 
 
 
 
122
  <p style="text-align:center;">Intelligently qualify sales deals using engagement and pipeline signals.</p>
123
  """, elem_id="header")
124
 
 
53
  def calculate_risk(ai_score, confidence, emails, meetings):
54
  # Make sure to map the value to the Salesforce picklist options
55
  if ai_score > 0.75 and confidence > 75:
56
+ return "Low"
57
  elif ai_score > 0.5:
58
+ return "Medium"
59
  else:
60
+ return "High"
61
 
62
  def generate_recommendation(stage, emails, meetings, risk):
63
  # Example recommendation generation
 
117
 
118
  # Gradio UI
119
  with gr.Blocks(title="AI Deal Qualification Engine") as app:
120
+ # Custom header with logout button
121
+ gr.HTML("""
122
+ <div style="display: flex; justify-content: space-between; align-items: center;
123
+ background-color: #1a1a1a; color: white; padding: 12px 20px; border-radius: 8px;">
124
+ <div>
125
+ <h1 style="margin: 0; font-size: 22px;">🤖 AI-Powered Deal Qualification Engine</h1>
126
+ </div>
127
+ <div>
128
+ <button style="background-color: black; color: white; border: none;
129
+ padding: 8px 16px; border-radius: 6px; cursor: pointer;">
130
+ Logout
131
+ </button>
132
+ </div>
133
+ </div>
134
  <p style="text-align:center;">Intelligently qualify sales deals using engagement and pipeline signals.</p>
135
  """, elem_id="header")
136