Spaces:
Runtime error
Runtime error
new fixes...
Browse files
app.py
CHANGED
|
@@ -44,19 +44,19 @@ def get_llm_response_and_generate_unit(subject, year, key_concept, related_conce
|
|
| 44 |
return llm_response
|
| 45 |
|
| 46 |
iface1 = gr.Interface(fn=generate_unit,
|
| 47 |
-
inputs=[gr.
|
| 48 |
-
gr.
|
| 49 |
-
outputs=[gr.
|
| 50 |
-
gr.
|
| 51 |
-
gr.
|
| 52 |
|
| 53 |
iface2 = gr.Interface(fn=get_llm_response_and_generate_unit,
|
| 54 |
-
inputs=[gr.
|
| 55 |
-
gr.
|
| 56 |
-
gr.
|
| 57 |
-
gr.
|
| 58 |
-
gr.
|
| 59 |
-
outputs=gr.
|
| 60 |
|
| 61 |
iface = gr.Series(interfaces=[iface1, iface2],
|
| 62 |
title="Unit Idea Generator (MYP Version)",
|
|
|
|
| 44 |
return llm_response
|
| 45 |
|
| 46 |
iface1 = gr.Interface(fn=generate_unit,
|
| 47 |
+
inputs=[gr.inputs.Dropdown(choices=subjects, label="Subject", default=subjects[0]),
|
| 48 |
+
gr.inputs.Dropdown(choices=myp_years, label="MYP Year", default=myp_years[0])],
|
| 49 |
+
outputs=[gr.outputs.Textbox(label="Key Concept"),
|
| 50 |
+
gr.outputs.Textbox(label="Related Concept"),
|
| 51 |
+
gr.outputs.Textbox(label="Global Context")])
|
| 52 |
|
| 53 |
iface2 = gr.Interface(fn=get_llm_response_and_generate_unit,
|
| 54 |
+
inputs=[gr.inputs.Dropdown(choices=subjects, label="Subject", default=subjects[0]),
|
| 55 |
+
gr.inputs.Dropdown(choices=myp_years, label="MYP Year", default=myp_years[0]),
|
| 56 |
+
gr.inputs.Textbox(label="Key Concept"),
|
| 57 |
+
gr.inputs.Textbox(label="Related Concept"),
|
| 58 |
+
gr.inputs.Textbox(label="Global Context")],
|
| 59 |
+
outputs=gr.outputs.Textbox(label="LLM Response"))
|
| 60 |
|
| 61 |
iface = gr.Series(interfaces=[iface1, iface2],
|
| 62 |
title="Unit Idea Generator (MYP Version)",
|