eliwill commited on
Commit
142631d
·
1 Parent(s): 02c63bd

Reformat Inputs

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -57,29 +57,32 @@ 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="#title {color: #F0FFFF} .gradio-container {background-image: url('file=mountains.jpg')}") as demo:
61
  gr.Markdown("""
62
  # Ask a Philsopher
63
  """,
64
  elem_id="title"
65
  )
66
  with gr.Row():
67
- with gr.Column():
68
- inp1 = gr.Textbox(placeholder="Place your question here...", label="Ask a question")
69
- inp2 = gr.Dropdown(choices=["stoic", "krishnamurti"], value="stoic", label="Choose a philosopher")
70
- out_image = gr.Image(label="Picture")
71
-
72
- with gr.Column():
73
  out1 = gr.Textbox(
74
  lines=3,
75
  max_lines=10,
76
  label="Answer"
77
  )
 
 
 
78
  out2 = gr.DataFrame(
79
  headers=["Quotes"],
80
  max_rows=5,
81
  interactive=False,
82
  wrap=True)
 
83
  btn = gr.Button("Run")
84
  btn.click(fn=main, inputs=[inp1,inp2], outputs=[out1,out2,out_image])
85
 
 
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="#title {color: #F0FFFF} .gradio-container {background-image: url('file=mountains_resized.jpg')}") as demo:
61
  gr.Markdown("""
62
  # Ask a Philsopher
63
  """,
64
  elem_id="title"
65
  )
66
  with gr.Row():
67
+ with gr.Row():
68
+ with gr.Column():
69
+ inp1 = gr.Textbox(placeholder="Place your question here...", label="Ask a question")
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])
88