Spaces:
Paused
Paused
Commit
·
ec9763e
1
Parent(s):
cb80c15
update app
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ mycss = """
|
|
15 |
#secondrow {{padding:0 6%;gap:30px}}
|
16 |
|
17 |
#name {{background-color: {bgcolor};border-style:none;border-width:0;box-shadow:none;padding-left:0;padding-right:0}}
|
18 |
-
#name
|
19 |
|
20 |
|
21 |
#question {{background-color: {bgcolor};border-style:none; !important;box-shadow:none !important;padding-left:0;padding-right:0}}
|
@@ -41,6 +41,8 @@ def handleSubmit(brain_name, question, temperature, maxTokens):
|
|
41 |
return "Please select Brain Name"
|
42 |
if (question == ""):
|
43 |
return "Please Enter Question"
|
|
|
|
|
44 |
return askQuestion(brain_name, question, temperature, maxTokens)
|
45 |
|
46 |
|
@@ -57,8 +59,8 @@ with gr.Blocks(theme=gr.themes.Soft(), css=formatted_css) as block_demo:
|
|
57 |
|
58 |
with gr.Column(scale=1, elem_id="inputsCol"):
|
59 |
|
60 |
-
brain_name = gr.
|
61 |
-
label="Brain Name",
|
62 |
question = gr.Textbox(
|
63 |
label="Question", lines=2, elem_id="question")
|
64 |
|
|
|
15 |
#secondrow {{padding:0 6%;gap:30px}}
|
16 |
|
17 |
#name {{background-color: {bgcolor};border-style:none;border-width:0;box-shadow:none;padding-left:0;padding-right:0}}
|
18 |
+
#name span {{background-color:{bgcolor};color:{scolor};font-size:18px}}
|
19 |
|
20 |
|
21 |
#question {{background-color: {bgcolor};border-style:none; !important;box-shadow:none !important;padding-left:0;padding-right:0}}
|
|
|
41 |
return "Please select Brain Name"
|
42 |
if (question == ""):
|
43 |
return "Please Enter Question"
|
44 |
+
if getBrains(brain_name) == False:
|
45 |
+
return "Please Enter Correct Brain Name"
|
46 |
return askQuestion(brain_name, question, temperature, maxTokens)
|
47 |
|
48 |
|
|
|
59 |
|
60 |
with gr.Column(scale=1, elem_id="inputsCol"):
|
61 |
|
62 |
+
brain_name = gr.Textbox(
|
63 |
+
label="Brain Name", elem_id="name")
|
64 |
question = gr.Textbox(
|
65 |
label="Question", lines=2, elem_id="question")
|
66 |
|