Mohamed Dyab commited on
Commit
d76d1b0
·
1 Parent(s): 5dbae09
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ from langchain_classic.chains import RetrievalQA
11
 
12
  # 1. SETUP: DEFINING THE MODELS
13
  # We use a smaller/faster multilingual embedding model for retrieval
14
- embedding_model_name = "intfloat/multilingual-e5-small"
15
 
16
  # Detect device - use CUDA if available, otherwise CPU
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
@@ -44,7 +44,7 @@ def process_and_chat(file, query):
44
  return "**Error:** COHERE_API_KEY environment variable is not set."
45
 
46
  # Initialize LLM (Cohere Command R - faster model)
47
- llm = ChatCohere(model="command-r7b-12-2024", temperature=0.3, cohere_api_key=api_key)
48
 
49
  # 2. LOAD & PROCESS DOCUMENT
50
  # Gradio 6.x returns file path as string directly
 
11
 
12
  # 1. SETUP: DEFINING THE MODELS
13
  # We use a smaller/faster multilingual embedding model for retrieval
14
+ embedding_model_name = "intfloat/multilingual-e5-large"
15
 
16
  # Detect device - use CUDA if available, otherwise CPU
17
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
44
  return "**Error:** COHERE_API_KEY environment variable is not set."
45
 
46
  # Initialize LLM (Cohere Command R - faster model)
47
+ llm = ChatCohere(model="command-a-03-2025", temperature=0.3, cohere_api_key=api_key)
48
 
49
  # 2. LOAD & PROCESS DOCUMENT
50
  # Gradio 6.x returns file path as string directly