Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5 |
import tempfile
|
6 |
import asyncio
|
7 |
import time
|
8 |
-
from typing import List, Dict, Any
|
9 |
from urllib.parse import urlparse, unquote
|
10 |
from pathlib import Path
|
11 |
|
@@ -49,7 +49,7 @@ GROQ_MODEL_NAME = "llama3-70b-8192"
|
|
49 |
EMBEDDING_MODEL_NAME = "sentence-transformers/all-MiniLM-L6-v2"
|
50 |
|
51 |
# Global variable to hold the initialized embedding model
|
52 |
-
embed_model_instance: HuggingFaceEmbedding
|
53 |
|
54 |
if GROQ_API_KEY == "gsk_...":
|
55 |
print("WARNING: GROQ_API_KEY is not set. Please set it in your environment or main.py.")
|
|
|
5 |
import tempfile
|
6 |
import asyncio
|
7 |
import time
|
8 |
+
from typing import List, Dict, Any, Union
|
9 |
from urllib.parse import urlparse, unquote
|
10 |
from pathlib import Path
|
11 |
|
|
|
49 |
EMBEDDING_MODEL_NAME = "sentence-transformers/all-MiniLM-L6-v2"
|
50 |
|
51 |
# Global variable to hold the initialized embedding model
|
52 |
+
embed_model_instance: Union[HuggingFaceEmbedding, None] = None
|
53 |
|
54 |
if GROQ_API_KEY == "gsk_...":
|
55 |
print("WARNING: GROQ_API_KEY is not set. Please set it in your environment or main.py.")
|