Alpha108 commited on
Commit
d34b63c
·
verified ·
1 Parent(s): 4947d99

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -46,12 +46,14 @@ def detect_and_translate_to_english(text: str) -> str:
46
  class GEOSEOApp:
47
  """Main application class that orchestrates all components"""
48
 
 
49
  def __init__(self):
50
  self.setup_config()
51
  self.setup_models()
52
  self.setup_parsers()
53
  self.setup_components()
54
 
 
55
  def setup_config(self):
56
  """Initialize configuration and API keys"""
57
  self.groq_api_key = os.getenv("GROQ_API_KEY", "your-groq-api-key")
@@ -70,6 +72,7 @@ class GEOSEOApp:
70
 
71
  self.embeddings = HuggingFaceEmbeddings(
72
  model_name="sentence-transformers/all-MiniLM-L6-v2",
 
73
  cache_folder="./hf_cache",
74
  )
75
 
 
46
  class GEOSEOApp:
47
  """Main application class that orchestrates all components"""
48
 
49
+
50
  def __init__(self):
51
  self.setup_config()
52
  self.setup_models()
53
  self.setup_parsers()
54
  self.setup_components()
55
 
56
+
57
  def setup_config(self):
58
  """Initialize configuration and API keys"""
59
  self.groq_api_key = os.getenv("GROQ_API_KEY", "your-groq-api-key")
 
72
 
73
  self.embeddings = HuggingFaceEmbeddings(
74
  model_name="sentence-transformers/all-MiniLM-L6-v2",
75
+ model_kwargs={"device": "cpu"},
76
  cache_folder="./hf_cache",
77
  )
78