Spaces:
Sleeping
Sleeping
Zeggai Abdellah
commited on
Commit
·
bb594f6
1
Parent(s):
76336d2
update the main to work with process_question_with_citations
Browse files
main.py
CHANGED
|
@@ -12,7 +12,7 @@ import logging
|
|
| 12 |
|
| 13 |
# Import our modules
|
| 14 |
from prepare_env import prepare_environment
|
| 15 |
-
from rag_pipeline import initialize_rag_pipeline, process_question
|
| 16 |
|
| 17 |
# Load environment variables
|
| 18 |
load_dotenv()
|
|
@@ -97,7 +97,7 @@ async def ask_question(question: str = Query(..., description="The medical quest
|
|
| 97 |
logger.info(f"Processing question: {question[:100]}...")
|
| 98 |
|
| 99 |
# Process the question through RAG pipeline
|
| 100 |
-
answer =
|
| 101 |
|
| 102 |
logger.info("Question processed successfully")
|
| 103 |
|
|
|
|
| 12 |
|
| 13 |
# Import our modules
|
| 14 |
from prepare_env import prepare_environment
|
| 15 |
+
from rag_pipeline import initialize_rag_pipeline, process_question,process_question_with_citations
|
| 16 |
|
| 17 |
# Load environment variables
|
| 18 |
load_dotenv()
|
|
|
|
| 97 |
logger.info(f"Processing question: {question[:100]}...")
|
| 98 |
|
| 99 |
# Process the question through RAG pipeline
|
| 100 |
+
answer = process_question_with_citations(agent, question)
|
| 101 |
|
| 102 |
logger.info("Question processed successfully")
|
| 103 |
|