mayzinoo commited on
Commit
b3bf22a
·
verified ·
1 Parent(s): 9e30f97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -91,4 +91,17 @@ def retrieve_and_generate_app(query, top_k=3):
91
 
92
  context = "\n\n".join([f"SOL {doc['id']}: {doc['content']}" for doc in retrieved_docs])
93
 
94
- prompt = f""""""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
  context = "\n\n".join([f"SOL {doc['id']}: {doc['content']}" for doc in retrieved_docs])
93
 
94
+ prompt = f""""""
95
+
96
+ # Create Gradio interface
97
+ demo = gr.Interface(
98
+ fn=retrieve_and_generate_app,
99
+ inputs=gr.Textbox(lines=2, placeholder="Enter your geometry-related question here..."),
100
+ outputs=gr.Textbox(label="Generated Answer"),
101
+ title="Virginia SOL Geometry Assistant",
102
+ description="Ask questions about the Geometry SOL Instructional Guide"
103
+ )
104
+
105
+ # Launch the app
106
+ if __name__ == "__main__":
107
+ demo.launch()