Spaces:
Sleeping
Sleeping
Update app.py
Browse files21 unmodified lines22232425262728293031323334353621 unmodified linesllm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0.2)# Prompt templatestemplates = {"flashcard": PromptTemplate(input_variables=["context", "query"],template="""{context}Create 5 flashcards based on: "{query}"Each card should have a question and short answer.""")}21 unmodified lines222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767721 unmodified linesllm = ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0.2)# ✅ Prompt templatestemplates = {"flashcard": PromptTemplate(input_variables=["context", "query"],template="""{context}Create 5 flashcards based on the topic: "{query}"Each flashcard should include:- A clear question- A short answerFocus on high school geometry understanding."""),"lesson plan": PromptTemplate(input_variables=["context", "query"],template="""Given the following retrieved SOL text:{context}Generate a Geometry lesson plan based on: "{query}"Include:1. Simple explanation of the concept.2. Real-world example.3. Engaging class activity.Be concise and curriculum-aligned for high school."""),"worksheet": PromptTemplate(input_variables=["context", "query"],template="""{context}Create a student worksheet for: "{query}"Include:- Concept summary- A worked example- 3 practice problems"""),"proofs": PromptTemplate(input_variables=["context", "query"],template="""{context}Generate a proof-focused geometry lesson plan for: "{query}"Include:- Student-friendly explanation- Real-world connection- One short class activity""")}
app.py+44-3