File size: 2,638 Bytes
53e6d18
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a5fe294
 
 
 
 
53e6d18
 
 
0ba311e
53e6d18
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import os
import gradio as gr
import json 
from PIL import Image
from gradio_client import Client, handle_file

hf_key = os.environ['HF_API_KEY']
client_url = os.environ['BK_URL']

client = Client(client_url, hf_token=hf_key)
def generate_jd(app_pwd, comp_desc, comp_web, hiring_needs, spec_benefits):

  res = client.predict(
        app_pwd=app_pwd, 
        comp_desc=comp_desc, 
        comp_web=comp_web, 
        hiring_needs=hiring_needs, 
        spec_benefits=spec_benefits,
		api_name="/generate_jd"
  )

  return res

def_comp_descr = "Parallel Wireless is making a big difference for Mobile Network Operators (MNOs) across the globe as they move toward a secure, cloud-enabled, digital future built on Open RAN technology, and our teams from around the world are all in. There’s no better time to join Parallel Wireless to lead the disruption in wireless networks and propel your future."
def_comp_web = "https://www.parallelwireless.com/"
def_hiring_needs = "Platform Software Manager for Platform Team is responsible for developing infrastructure software services required by our proprietary software which provides 5G/4G/3G/2G services for mobile providers worldwide. "
def_specific_benefits = "Parallel Wireless delivers on a People First Strategy. Our team members are essential to making Parallel Wireless an innovative technology leader! Our competitive total rewards package and long-term wealth creation opportunity are unmatched in the industry. Professionals at Parallel Wireless are provided with rapid career growth opportunities to reach their full potential and make a strong lasting impact within the Parallel Wireless community."

with gr.Blocks() as genjd:
    gr.Markdown("# Job Description Generator")
    gr.Markdown("Enter Company description, Company website, Hiring needs, Specific benefits and Press Generatate Job Description. ")
    gr.Markdown("Ensure you have the right password to use this feature and enter it in password section. ")
    app_pwd = gr.Textbox(label="Enter App Password:", value="")
    comp_desc = gr.Textbox(label="Enter Company Description:", value=def_comp_descr)
    comp_web = gr.Textbox(label="Enter Company Website:", value=def_comp_web)
    hiring_needs = gr.Textbox(label="Enter Hiring needs:", value=def_hiring_needs)
    spec_benefits = gr.Textbox(label="Enter Specific benefits:", value=def_specific_benefits)
    generate_btn = gr.Button("Generate Job Description")

    jd_html_view = gr.HTML(value="")

    generate_btn.click(
        generate_jd,
        inputs=[app_pwd, comp_desc, comp_web, hiring_needs, spec_benefits],
        outputs=[jd_html_view]
    )