Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
with gr.
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
with gr.
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
with gr.
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
with gr.
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
with gr.
|
| 88 |
-
|
| 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):
|