Spaces:
Build error
Build error
Fix formatting
Browse files
app.py
CHANGED
@@ -57,31 +57,31 @@ def main(question, philosopher):
|
|
57 |
out_image = "marcus-aurelius.jpg"
|
58 |
return ask_philosopher(philosopher, question), get_similar_quotes(philosopher, question), out_image
|
59 |
|
60 |
-
with gr.Blocks(css="
|
61 |
gr.Markdown("""
|
62 |
# Ask a Philsopher
|
63 |
""",
|
64 |
elem_id="title"
|
65 |
)
|
|
|
66 |
with gr.Row():
|
67 |
-
with gr.
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
wrap=True)
|
85 |
|
86 |
btn = gr.Button("Run")
|
87 |
btn.click(fn=main, inputs=[inp1,inp2], outputs=[out1,out2,out_image])
|
|
|
57 |
out_image = "marcus-aurelius.jpg"
|
58 |
return ask_philosopher(philosopher, question), get_similar_quotes(philosopher, question), out_image
|
59 |
|
60 |
+
with gr.Blocks(css=".gradio-container {background-image: url('file=mountains_resized.jpg')} # title {color: #F0FFFF}") as demo:
|
61 |
gr.Markdown("""
|
62 |
# Ask a Philsopher
|
63 |
""",
|
64 |
elem_id="title"
|
65 |
)
|
66 |
+
|
67 |
with gr.Row():
|
68 |
+
with gr.Column():
|
69 |
+
inp1 = gr.Textbox(placeholder="Place your question here...", label="Ask a question", elem_id="title")
|
70 |
+
inp2 = gr.Dropdown(choices=["stoic", "krishnamurti"], value="stoic", label="Choose a philosopher")
|
71 |
+
|
72 |
+
out1 = gr.Textbox(
|
73 |
+
lines=3,
|
74 |
+
max_lines=10,
|
75 |
+
label="Answer"
|
76 |
+
)
|
77 |
+
|
78 |
+
with gr.Row():
|
79 |
+
out_image = gr.Image(label="Picture")
|
80 |
+
out2 = gr.DataFrame(
|
81 |
+
headers=["Quotes"],
|
82 |
+
max_rows=5,
|
83 |
+
interactive=False,
|
84 |
+
wrap=True)
|
|
|
85 |
|
86 |
btn = gr.Button("Run")
|
87 |
btn.click(fn=main, inputs=[inp1,inp2], outputs=[out1,out2,out_image])
|