Michelangiolo commited on
Commit
361c653
1 Parent(s): 6c655b6
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -32,15 +32,14 @@ def gpt3_endpoint(api_key, prompt):
32
  import gradio as gr
33
 
34
  #the first module becomes text1, the second module file1
35
- def greet(length, name, do, tone):
36
  prompt = f"""
37
  Write a {length} with {tone} tone for a startup with the following info:
38
  The name of the startup: {name}
39
  what does the startup do? {do}
 
 
40
  """
41
- # audience of the pitch: {audience}
42
- # vision of the startup: {vision}
43
- # """
44
  return gpt3_endpoint(gpt3_key, prompt).replace('\n', ' ').strip()
45
 
46
  with gr.Blocks() as demo:
@@ -53,10 +52,12 @@ with gr.Blocks() as demo:
53
  input2 = gr.Text(headers=["q1"], label="What is the name of your Startup?", value='Goliath AI Consulting')
54
  input3 = gr.Text(headers=["q2"], label="What does your startup do?", value='We build AI Recommendation Systems')
55
  input4 = gr.Radio(["professional", "funny", "innovative", "challenging"], label="Tone", value='innovative')
 
 
56
 
57
  btn = gr.Button(value="Write a Pitch!")
58
  state = gr.Text(label="Output")
59
- btn.click(greet, [input1, input2, input3, input4], [state])
60
  demo.launch(share=False)
61
 
62
  # iface = gr.Interface(
@@ -67,8 +68,7 @@ demo.launch(share=False)
67
  # gr.Text(headers=["q1"], label="What is the name of your Startup?", value='Goliath AI Consulting'),
68
  # gr.Text(headers=["q2"], label="What does your startup do?", value='We build AI Recommendation Systems'),
69
  # gr.Radio(["professional", "funny", "innovative", "challenging"], label="Tone", value='innovative'),
70
- # # gr.Radio(["clients", "VCs", "social media"], label="Pitch Audience", value='VCs')
71
- # # gr.Text(headers=["q5"], label="What is the vision of your company?", value='empowering companies with the latest AI')
72
  # ],
73
  # outputs='text'
74
  # )
 
32
  import gradio as gr
33
 
34
  #the first module becomes text1, the second module file1
35
+ def greet(length, name, do, tone, audience, vision):
36
  prompt = f"""
37
  Write a {length} with {tone} tone for a startup with the following info:
38
  The name of the startup: {name}
39
  what does the startup do? {do}
40
+ audience of the pitch: {audience}
41
+ vision of the startup: {vision}
42
  """
 
 
 
43
  return gpt3_endpoint(gpt3_key, prompt).replace('\n', ' ').strip()
44
 
45
  with gr.Blocks() as demo:
 
52
  input2 = gr.Text(headers=["q1"], label="What is the name of your Startup?", value='Goliath AI Consulting')
53
  input3 = gr.Text(headers=["q2"], label="What does your startup do?", value='We build AI Recommendation Systems')
54
  input4 = gr.Radio(["professional", "funny", "innovative", "challenging"], label="Tone", value='innovative')
55
+ input5 = gr.Radio(["clients", "VCs", "social media"], label="Pitch Audience", value='VCs')
56
+ input6 = gr.Text(headers=["q5"], label="What is the vision of your company?", value='empowering companies with the latest AI')
57
 
58
  btn = gr.Button(value="Write a Pitch!")
59
  state = gr.Text(label="Output")
60
+ btn.click(greet, [input1, input2, input3, input4, input5, input6], [state])
61
  demo.launch(share=False)
62
 
63
  # iface = gr.Interface(
 
68
  # gr.Text(headers=["q1"], label="What is the name of your Startup?", value='Goliath AI Consulting'),
69
  # gr.Text(headers=["q2"], label="What does your startup do?", value='We build AI Recommendation Systems'),
70
  # gr.Radio(["professional", "funny", "innovative", "challenging"], label="Tone", value='innovative'),
71
+ #
 
72
  # ],
73
  # outputs='text'
74
  # )