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

Update app.py

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