Spaces:
Sleeping
Sleeping
Update app.py
Browse files81 unmodified lines82838485868788899091929394959681 unmodified lineschain = LLMChain(llm=llm, prompt=templates[prompt_type])return chain.run({"context": context, "query": query})# Gradio UIwith gr.Blocks() as demo:gr.Markdown("# 📐 Geometry Assistant")query = gr.Textbox(label="Enter a geometry topic")prompt_type = gr.Dropdown(["flashcard"], value="flashcard", label="Prompt Type")output = gr.Textbox(label="Generated Output", lines=12)btn = gr.Button("Generate")btn.click(fn=generate_output, inputs=[prompt_type, query], outputs=output)demo.launch()81 unmodified lines82838485868788899091929394959697989910010110281 unmodified lineschain = LLMChain(llm=llm, prompt=templates[prompt_type])return chain.run({"context": context, "query": query})# ✅ Gradio UIwith gr.Blocks() as demo:gr.Markdown("# 📐 Geometry Teaching Assistant")with gr.Row():query = gr.Textbox(label="Enter a geometry topic")prompt_type = gr.Dropdown(["flashcard", "lesson plan", "worksheet", "proofs"],value="flashcard",label="Prompt Type")output = gr.Textbox(label="Generated Output", lines=12, interactive=True)btn = gr.Button("Generate")btn.click(fn=generate_output, inputs=[prompt_type, query], outputs=output)demo.launch()
app.py+11-5