Guiyom commited on
Commit
2fd49c8
·
1 Parent(s): a7fad61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +67 -68
app.py CHANGED
@@ -20,75 +20,74 @@ with gr.Blocks() as demo:
20
  apikey = gr.Textbox(label='Paste here your OpenAI - API key', info='No API key is stored and only you will see it.', lines = 1)
21
  with gr.Column(scale = 1):
22
  useapi = gr.Button("Use this API key")
 
 
23
  with gr.Row(visible = False) as fullblock:
24
- with gr.Row():
25
- language = gr.Textbox(label='Choose your output language', lines = 1, value = 'English')
26
- with gr.Row():
27
- with gr.Tab("Enquiry Description"):
28
- with gr.Row():
29
- gr.Markdown("Describe your project or study")
30
- with gr.Row():
31
- title = gr.Textbox(label='Topic you would like to submit to your focus group', lines = 5, placeholder = "ex: Ice cream tastes or smartphone features")
32
- with gr.Row():
33
- gr.Markdown("List all your questions")
34
- with gr.Row():
35
- question1 = gr.Textbox(label="Question 1", lines=2, placeholder = "ex: What are your favorite features for a smartphone?")
36
- with gr.Row():
37
- question2 = gr.Textbox(label="Question 2", lines=2, placeholder = "ex: How much would you be willing to pay for x, y , z (in USD)?")
38
- with gr.Row():
39
- question3 = gr.Textbox(label="Question 3", lines=2, placeholder = "ex: If you had no budget limit, what would be your dream functionality for a smartphone?")
40
- with gr.Tab("Focus Group Profiles Generation"):
41
- with gr.Row():
42
- gr.Markdown("Describe types of profiles you want in your focus group")
43
- with gr.Row():
44
- focusgroupdescription = gr.Textbox(label="Describe your focus group desired characteristics", info= "For example: women in their 30s, teenagers, mixed ethnicity from Vietnam, ...", lines=5)
45
- with gr.Row():
46
- generategroup = gr.Button("Generate my focus group")
47
- with gr.Row():
48
- gr.Markdown("Participants")
49
- with gr.Row():
50
- expert1 = gr.Textbox(label="Participant 1", lines=5)
51
- expert2 = gr.Textbox(label="Participant 2", lines=5)
52
- with gr.Row():
53
- expert3 = gr.Textbox(label="Participant 3", lines=5)
54
- expert4 = gr.Textbox(label="Participant 4", lines=5)
55
- with gr.Row():
56
- expert5 = gr.Textbox(label="Participant 5", lines=5)
57
- expert6 = gr.Textbox(label="Participant 6", lines=5)
58
- with gr.Row():
59
- expert7 = gr.Textbox(label="Participant 7", lines=5)
60
- expert8 = gr.Textbox(label="Participant 8", lines=5)
61
- with gr.Row():
62
- expert9 = gr.Textbox(label="Participant 9", lines=5)
63
- expert10 = gr.Textbox(label="Participant 10", lines=5)
64
- with gr.Tab("Results"):
65
- with gr.Row():
66
- generateresults = gr.Button("Generate focus group answers")
67
- with gr.Row():
68
- gr.Markdown("Responses from the focus group participants")
69
- with gr.Row():
70
- response1 = gr.Textbox(label="Response 1", lines=10)
71
- response2 = gr.Textbox(label="Response 2", lines=10)
72
- with gr.Row():
73
- response3 = gr.Textbox(label="Response 3", lines=10)
74
- response4 = gr.Textbox(label="Response 4", lines=10)
75
- with gr.Row():
76
- response5 = gr.Textbox(label="Response 5", lines=10)
77
- response6 = gr.Textbox(label="Response 6", lines=10)
78
- with gr.Row():
79
- response7 = gr.Textbox(label="Response 7", lines=10)
80
- response8 = gr.Textbox(label="Response 8", lines=10)
81
- with gr.Row():
82
- response9 = gr.Textbox(label="Response 9", lines=10)
83
- response10 = gr.Textbox(label="Response 10", lines=10)
84
- with gr.Tab("Summary"):
85
- with gr.Row():
86
- generatesummary = gr.Button("Generate the focus group summary")
87
- with gr.Row():
88
- summary = gr.Textbox(label="Report summary", lines=50)
89
- with gr.Row():
90
- with gr.Accordion("Restore", open = False):
91
- restore = gr.Button("Restore data from report")
92
  clear = gr.Button("Clear", visible = False)
93
 
94
  def uploaddetailsfromreport(report):
 
20
  apikey = gr.Textbox(label='Paste here your OpenAI - API key', info='No API key is stored and only you will see it.', lines = 1)
21
  with gr.Column(scale = 1):
22
  useapi = gr.Button("Use this API key")
23
+ with gr.Row():
24
+ language = gr.Textbox(label='Input your language for the results', lines = 1, value = 'English')
25
  with gr.Row(visible = False) as fullblock:
26
+ with gr.Tab("Enquiry Description"):
27
+ with gr.Row():
28
+ gr.Markdown("Describe your project or study")
29
+ with gr.Row():
30
+ title = gr.Textbox(label='Topic you would like to submit to your focus group', lines = 5, placeholder = "ex: Ice cream tastes or smartphone features")
31
+ with gr.Row():
32
+ gr.Markdown("List all your questions")
33
+ with gr.Row():
34
+ question1 = gr.Textbox(label="Question 1", lines=2, placeholder = "ex: What are your favorite features for a smartphone?")
35
+ with gr.Row():
36
+ question2 = gr.Textbox(label="Question 2", lines=2, placeholder = "ex: How much would you be willing to pay for x, y , z (in USD)?")
37
+ with gr.Row():
38
+ question3 = gr.Textbox(label="Question 3", lines=2, placeholder = "ex: If you had no budget limit, what would be your dream functionality for a smartphone?")
39
+ with gr.Tab("Focus Group Profiles Generation"):
40
+ with gr.Row():
41
+ gr.Markdown("Describe types of profiles you want in your focus group")
42
+ with gr.Row():
43
+ focusgroupdescription = gr.Textbox(label="Describe your focus group desired characteristics", info= "For example: women in their 30s, teenagers, mixed ethnicity from Vietnam, ...", lines=5)
44
+ with gr.Row():
45
+ generategroup = gr.Button("Generate my focus group")
46
+ with gr.Row():
47
+ gr.Markdown("Participants")
48
+ with gr.Row():
49
+ expert1 = gr.Textbox(label="Participant 1", lines=5)
50
+ expert2 = gr.Textbox(label="Participant 2", lines=5)
51
+ with gr.Row():
52
+ expert3 = gr.Textbox(label="Participant 3", lines=5)
53
+ expert4 = gr.Textbox(label="Participant 4", lines=5)
54
+ with gr.Row():
55
+ expert5 = gr.Textbox(label="Participant 5", lines=5)
56
+ expert6 = gr.Textbox(label="Participant 6", lines=5)
57
+ with gr.Row():
58
+ expert7 = gr.Textbox(label="Participant 7", lines=5)
59
+ expert8 = gr.Textbox(label="Participant 8", lines=5)
60
+ with gr.Row():
61
+ expert9 = gr.Textbox(label="Participant 9", lines=5)
62
+ expert10 = gr.Textbox(label="Participant 10", lines=5)
63
+ with gr.Tab("Results"):
64
+ with gr.Row():
65
+ generateresults = gr.Button("Generate focus group answers")
66
+ with gr.Row():
67
+ gr.Markdown("Responses from the focus group participants")
68
+ with gr.Row():
69
+ response1 = gr.Textbox(label="Response 1", lines=10)
70
+ response2 = gr.Textbox(label="Response 2", lines=10)
71
+ with gr.Row():
72
+ response3 = gr.Textbox(label="Response 3", lines=10)
73
+ response4 = gr.Textbox(label="Response 4", lines=10)
74
+ with gr.Row():
75
+ response5 = gr.Textbox(label="Response 5", lines=10)
76
+ response6 = gr.Textbox(label="Response 6", lines=10)
77
+ with gr.Row():
78
+ response7 = gr.Textbox(label="Response 7", lines=10)
79
+ response8 = gr.Textbox(label="Response 8", lines=10)
80
+ with gr.Row():
81
+ response9 = gr.Textbox(label="Response 9", lines=10)
82
+ response10 = gr.Textbox(label="Response 10", lines=10)
83
+ with gr.Tab("Summary"):
84
+ with gr.Row():
85
+ generatesummary = gr.Button("Generate the focus group summary")
86
+ with gr.Row():
87
+ summary = gr.Textbox(label="Report summary", lines=50)
88
+ with gr.Row():
89
+ with gr.Accordion("Restore", open = False):
90
+ restore = gr.Button("Restore data from report")
 
 
 
91
  clear = gr.Button("Clear", visible = False)
92
 
93
  def uploaddetailsfromreport(report):