Commit
·
2f6509e
1
Parent(s):
8a3a868
Fixed overflow UI issue
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ if not Path(FAISS_PATH).exists():
|
|
46 |
if not Path(CHUNKS_PATH).exists():
|
47 |
raise FileNotFoundError(f"Chunks file not found at {CHUNKS_PATH}")
|
48 |
|
49 |
-
KRISHNA_BIO = """Krishna Vamsi Dhulipalla
|
50 |
|
51 |
He has led projects involving retrieval-augmented generation (RAG), feature selection for genomic classification, fine-tuning domain-specific LLMs (e.g., DNABERT, HyenaDNA), and real-time forecasting systems using Kafka, Spark, and Airflow. His cloud proficiency spans AWS (S3, SageMaker, ECS, CloudWatch), GCP (BigQuery, Cloud Composer), and DevOps tools like Docker, Kubernetes, and MLflow.
|
52 |
|
@@ -408,7 +408,7 @@ select_and_prompt = RunnableLambda(lambda x:
|
|
408 |
answer_chain = (
|
409 |
prepare_answer_inputs
|
410 |
| select_and_prompt
|
411 |
-
|
|
412 |
)
|
413 |
|
414 |
def RExtract(pydantic_class: Type[BaseModel], llm, prompt):
|
@@ -512,6 +512,7 @@ with gr.Blocks(css="""
|
|
512 |
display: flex;
|
513 |
flex-direction: column;
|
514 |
height: 95%;
|
|
|
515 |
}
|
516 |
|
517 |
.chatbot {
|
@@ -533,75 +534,15 @@ with gr.Blocks(css="""
|
|
533 |
chatbot = gr.Chatbot(elem_classes="chatbot")
|
534 |
textbox = gr.Textbox(placeholder="Ask a question about Krishna...", elem_classes="textbox")
|
535 |
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
|
547 |
-
demo.launch(max_threads=4, prevent_thread_lock=True, debug=True)
|
548 |
-
|
549 |
-
# with gr.Blocks(css="""
|
550 |
-
# html, body, .gradio-container {
|
551 |
-
# height: 100%;
|
552 |
-
# margin: 0;
|
553 |
-
# padding: 0;
|
554 |
-
# }
|
555 |
-
# .gradio-container {
|
556 |
-
# width: 90%;
|
557 |
-
# max-width: 1000px;
|
558 |
-
# margin: 0 auto;
|
559 |
-
# padding: 1rem;
|
560 |
-
# }
|
561 |
-
|
562 |
-
# .chatbox-container {
|
563 |
-
# display: flex;
|
564 |
-
# flex-direction: column;
|
565 |
-
# height: 95%;
|
566 |
-
# }
|
567 |
-
|
568 |
-
# .chatbot {
|
569 |
-
# flex: 1;
|
570 |
-
# overflow-y: auto;
|
571 |
-
# min-height: 500px;
|
572 |
-
# }
|
573 |
-
|
574 |
-
# .textbox {
|
575 |
-
# margin-top: 1rem;
|
576 |
-
# }
|
577 |
-
# #component-523 {
|
578 |
-
# height: 98%;
|
579 |
-
# }
|
580 |
-
# """) as demo:
|
581 |
-
# with gr.Column(elem_classes="chatbox-container"):
|
582 |
-
# gr.Markdown("## 💬 Ask Krishna's AI Assistant")
|
583 |
-
# gr.Markdown("💡 Ask anything about Krishna Vamsi Dhulipalla")
|
584 |
-
# chatbot = gr.Chatbot(elem_classes="chatbot", type="messages")
|
585 |
-
# textbox = gr.Textbox(placeholder="Ask a question about Krishna...", elem_classes="textbox")
|
586 |
-
|
587 |
-
# gr.ChatInterface(
|
588 |
-
# fn=chat_interface,
|
589 |
-
# chatbot=chatbot,
|
590 |
-
# textbox=textbox,
|
591 |
-
# # examples=[
|
592 |
-
# # "What are Krishna's research interests?",
|
593 |
-
# # "Where did Krishna work?",
|
594 |
-
# # "What did he study at Virginia Tech?"
|
595 |
-
# # ],
|
596 |
-
# type= "messages",
|
597 |
-
# )
|
598 |
-
|
599 |
-
# if __name__ == "__main__":
|
600 |
-
# # Add resource verification
|
601 |
-
# print(f"FAISS path exists: {Path(FAISS_PATH).exists()}")
|
602 |
-
# print(f"Chunks path exists: {Path(CHUNKS_PATH).exists()}")
|
603 |
-
# print(f"Vectorstore type: {type(vectorstore)}")
|
604 |
-
# print(f"All chunks count: {len(all_chunks)}")
|
605 |
-
|
606 |
-
# # Launch the application
|
607 |
-
# demo.launch(debug=True)
|
|
|
46 |
if not Path(CHUNKS_PATH).exists():
|
47 |
raise FileNotFoundError(f"Chunks file not found at {CHUNKS_PATH}")
|
48 |
|
49 |
+
KRISHNA_BIO = """Krishna Vamsi Dhulipalla completed M.Eng program in Computer Science at Virginia Tech, awarded degree in december 2024, with over 3 years of experience across data engineering, machine learning research, and real-time analytics. He specializes in building scalable data systems and intelligent LLM-powered applications, with strong expertise in Python, PyTorch, Hugging Face Transformers, and end-to-end ML pipelines.
|
50 |
|
51 |
He has led projects involving retrieval-augmented generation (RAG), feature selection for genomic classification, fine-tuning domain-specific LLMs (e.g., DNABERT, HyenaDNA), and real-time forecasting systems using Kafka, Spark, and Airflow. His cloud proficiency spans AWS (S3, SageMaker, ECS, CloudWatch), GCP (BigQuery, Cloud Composer), and DevOps tools like Docker, Kubernetes, and MLflow.
|
52 |
|
|
|
408 |
answer_chain = (
|
409 |
prepare_answer_inputs
|
410 |
| select_and_prompt
|
411 |
+
| answer_llm
|
412 |
)
|
413 |
|
414 |
def RExtract(pydantic_class: Type[BaseModel], llm, prompt):
|
|
|
512 |
display: flex;
|
513 |
flex-direction: column;
|
514 |
height: 95%;
|
515 |
+
overflow-y: auto;
|
516 |
}
|
517 |
|
518 |
.chatbot {
|
|
|
534 |
chatbot = gr.Chatbot(elem_classes="chatbot")
|
535 |
textbox = gr.Textbox(placeholder="Ask a question about Krishna...", elem_classes="textbox")
|
536 |
|
537 |
+
demo = gr.ChatInterface(
|
538 |
+
fn=chat_interface,
|
539 |
+
title="💬 Ask Krishna's AI Assistant",
|
540 |
+
description="💡 Ask anything about Krishna Vamsi Dhulipalla",
|
541 |
+
examples=[
|
542 |
+
"What are Krishna's research interests?",
|
543 |
+
"Where did Krishna work?",
|
544 |
+
"What did he study at Virginia Tech?"
|
545 |
+
],
|
546 |
+
)
|
547 |
|
548 |
+
demo.launch(max_threads=4, prevent_thread_lock=True, debug=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|