dk_outreach / app.py
amitagh's picture
refress
32b874c verified
import gradio as gr
import random
import os
import json
from PIL import Image
from gradio_client import Client
from dataclasses import dataclass
hf_key = os.environ['HF_API_KEY']
client = Client("amitagh/salestech", hf_token=hf_key)
def get_agt_rsp(app_pwd, own_company_name, lead_name, industry, key_decision_maker, position, milestone):
result = client.predict(
app_pwd=app_pwd,
own_company_name=own_company_name,
lead_name=lead_name,
industry=industry,
key_decision_maker=key_decision_maker,
position=position,
milestone=milestone,
api_name="/gen_cust_outreach"
)
return result
def_own_company_name="demokraft AI (demokraft.ai)"
def_lead_name="CleverTap"
def_industury="Software Products and services"
def_key_decision_maker="Suresh Kondamudi"
def_position="CTO"
def_milestone="Listed in Forrester report"
with gr.Blocks() as genoutreach:
gr.Markdown("# Sales Customer Outreach Generator")
gr.Markdown("Enter Own Company name, Lead Customer Company, Customer Industry, Key Decision Maker, His position (CEO/CTO/CXO) and Milestone. ")
app_pwd = gr.Textbox(label="Enter App Password:", value="XYZ")
own_company_name = gr.Textbox(label="Enter Own Company name:", value=def_own_company_name)
lead_name = gr.Textbox(label="Enter Lead Name:", value=def_lead_name)
industry = gr.Textbox(label="Enter Industry it operates in:", value=def_industury)
key_decision_maker = gr.Textbox(label="Enter Key Decision Maker:", value=def_key_decision_maker)
position = gr.Textbox(label="Enter his position:", value=def_position)
milestone = gr.Textbox(label="Enter Milestone:", value=def_milestone)
generate_btn = gr.Button("Generate Customer Outreach mails")
outreach_html_view = gr.HTML(value="")
generate_btn.click(
get_agt_rsp,
inputs=[app_pwd, own_company_name, lead_name, industry, key_decision_maker, position, milestone],
outputs=[outreach_html_view]
)
genoutreach.launch(debug=True)