Spaces:
Running
Running
girishwangikar
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -153,21 +153,19 @@ def ui_function(text, question):
|
|
153 |
example_text = """The Apollo 11 mission, launched by NASA in July 1969, was the first manned mission to land on the Moon. Commanded by Neil Armstrong and piloted by Buzz Aldrin and Michael Collins, it was the culmination of the Space Race between the United States and the Soviet Union. On July 20, 1969, Armstrong and Aldrin became the first humans to set foot on the lunar surface, while Collins orbited above in the command module."""
|
154 |
|
155 |
# Create Gradio interface
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
gr.
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
)
|
172 |
-
|
173 |
-
iface.launch()
|
|
|
153 |
example_text = """The Apollo 11 mission, launched by NASA in July 1969, was the first manned mission to land on the Moon. Commanded by Neil Armstrong and piloted by Buzz Aldrin and Michael Collins, it was the culmination of the Space Race between the United States and the Soviet Union. On July 20, 1969, Armstrong and Aldrin became the first humans to set foot on the lunar surface, while Collins orbited above in the command module."""
|
154 |
|
155 |
# Create Gradio interface
|
156 |
+
with gr.Blocks() as iface:
|
157 |
+
with gr.Row():
|
158 |
+
with gr.Column():
|
159 |
+
input_text = gr.Textbox(label="Input Text", value=example_text)
|
160 |
+
question = gr.Textbox(label="Question")
|
161 |
+
example_box = gr.Markdown(f"### Example Paragraph\n\n{example_text}")
|
162 |
+
graph_viz = gr.Image(label="Graph Visualization", type="filepath")
|
163 |
+
with gr.Column():
|
164 |
+
answer = gr.Textbox(label="Answer")
|
165 |
+
relations_table = gr.Dataframe(label="Relations Table")
|
166 |
+
summary = gr.Textbox(label="Summary")
|
167 |
+
generated_image = gr.Image(label="Generated Image", type="filepath")
|
168 |
+
|
169 |
+
gr.Button("Run").click(ui_function, inputs=[input_text, question], outputs=[answer, graph_viz, relations_table, summary, generated_image])
|
170 |
+
|
171 |
+
iface.launch()
|
|
|
|