Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -311,8 +311,7 @@ with gr.Blocks(title="Study Buddy", theme=gr.themes.Soft()) as app:
|
|
| 311 |
gr.Markdown("# 300 Level Anatamomy Study Buddy Anatomy bot")
|
| 312 |
gr.Markdown("Study more effectively with study Buddy!")
|
| 313 |
|
| 314 |
-
|
| 315 |
-
|
| 316 |
with gr.Column(scale=2):
|
| 317 |
# Main query interface
|
| 318 |
with gr.Group():
|
|
@@ -324,7 +323,7 @@ with gr.Blocks(title="Study Buddy", theme=gr.themes.Soft()) as app:
|
|
| 324 |
)
|
| 325 |
|
| 326 |
search_terms_input = gr.Textbox(
|
| 327 |
-
label="Search Terms
|
| 328 |
placeholder="Enter comma-separated terms to search for specific files",
|
| 329 |
lines=1
|
| 330 |
)
|
|
@@ -346,22 +345,24 @@ with gr.Blocks(title="Study Buddy", theme=gr.themes.Soft()) as app:
|
|
| 346 |
interactive=False
|
| 347 |
)
|
| 348 |
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
|
| 360 |
with gr.Group():
|
| 361 |
gr.Markdown("### Setup Instructions")
|
| 362 |
gr.Markdown("""
|
|
|
|
| 363 |
**Important Notes:**
|
| 364 |
-
|
|
|
|
| 365 |
|
| 366 |
**File Types Supported:**
|
| 367 |
- Google Docs
|
|
@@ -374,7 +375,6 @@ with gr.Blocks(title="Study Buddy", theme=gr.themes.Soft()) as app:
|
|
| 374 |
- The system searches the top 3 most relevant files
|
| 375 |
- Ask clear, specific questions for better answers
|
| 376 |
""")
|
| 377 |
-
|
| 378 |
|
| 379 |
# Event handlers
|
| 380 |
submit_btn.click(
|
|
@@ -398,6 +398,7 @@ with gr.Blocks(title="Study Buddy", theme=gr.themes.Soft()) as app:
|
|
| 398 |
inputs=[query_input, search_terms_input],
|
| 399 |
)
|
| 400 |
|
|
|
|
| 401 |
# Launch the app
|
| 402 |
if __name__ == "__main__":
|
| 403 |
app.launch(
|
|
|
|
| 311 |
gr.Markdown("# 300 Level Anatamomy Study Buddy Anatomy bot")
|
| 312 |
gr.Markdown("Study more effectively with study Buddy!")
|
| 313 |
|
| 314 |
+
with gr.Row():
|
|
|
|
| 315 |
with gr.Column(scale=2):
|
| 316 |
# Main query interface
|
| 317 |
with gr.Group():
|
|
|
|
| 323 |
)
|
| 324 |
|
| 325 |
search_terms_input = gr.Textbox(
|
| 326 |
+
label="Search Terms",
|
| 327 |
placeholder="Enter comma-separated terms to search for specific files",
|
| 328 |
lines=1
|
| 329 |
)
|
|
|
|
| 345 |
interactive=False
|
| 346 |
)
|
| 347 |
|
| 348 |
+
with gr.Column(scale=1):
|
| 349 |
+
# Status and setup info
|
| 350 |
+
with gr.Group():
|
| 351 |
+
gr.Markdown("### System Status")
|
| 352 |
+
status_btn = gr.Button("Check Status", size="sm")
|
| 353 |
+
status_output = gr.Textbox(
|
| 354 |
+
label="API Status",
|
| 355 |
+
lines=4,
|
| 356 |
+
interactive=False
|
| 357 |
+
)
|
| 358 |
|
| 359 |
with gr.Group():
|
| 360 |
gr.Markdown("### Setup Instructions")
|
| 361 |
gr.Markdown("""
|
| 362 |
+
|
| 363 |
**Important Notes:**
|
| 364 |
+
|
| 365 |
+
1.Only documents shared with studybuddy, it can answer
|
| 366 |
|
| 367 |
**File Types Supported:**
|
| 368 |
- Google Docs
|
|
|
|
| 375 |
- The system searches the top 3 most relevant files
|
| 376 |
- Ask clear, specific questions for better answers
|
| 377 |
""")
|
|
|
|
| 378 |
|
| 379 |
# Event handlers
|
| 380 |
submit_btn.click(
|
|
|
|
| 398 |
inputs=[query_input, search_terms_input],
|
| 399 |
)
|
| 400 |
|
| 401 |
+
|
| 402 |
# Launch the app
|
| 403 |
if __name__ == "__main__":
|
| 404 |
app.launch(
|