Spaces:
Sleeping
Sleeping
Update app.py
Browse files78 unmodified lines79808182838485868788899091929394959697989910010178 unmodified linestemplate="""You are a Virginia Geometry Standards of Learning (SOL) assistant.Based on the following standards content:{context}Which SOL standard code (e.g., G.RLT.1, G.TR.3) best applies to this query: "{query}"?Only return the code and a **one-sentence justification**.""")}def generate_output(prompt_type, query):docs = retriever.get_relevant_documents(query)context = "\n\n".join([doc.page_content for doc in docs])chain = LLMChain(llm=llm, prompt=templates[prompt_type])return chain.run({"context": context, "query": query})# ✅ Gradio UIwith gr.Blocks() as demo:78 unmodified lines79808182838485868788899091929394959697989910010110210310410510610710878 unmodified linestemplate="""You are a Virginia Geometry Standards of Learning (SOL) assistant.From the following standards content:{context}Identify the SOL standard (e.g., G.RLT.1, G.TR.3) that most accurately answers the user's question: "{query}"Respond with:1. The SOL code (e.g., G.RLT.3)2. The **exact standard description** for that code, as written in the contextDo not summarize. Copy the official description exactly.""")}def generate_output(prompt_type, query):docs = retriever.get_relevant_documents(query)context = "\n\n".join([doc.page_content for doc in docs])chain = LLMChain(llm=llm, prompt=templates[prompt_type])output = chain.run({"context": context, "query": query})return output.strip()# ✅ Gradio UIwith gr.Blocks() as demo:
app.py+11-4