Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
import time, os, multiprocessing
|
2 |
from minivectordb.embedding_model import EmbeddingModel
|
3 |
from minivectordb.vector_database import VectorDatabase
|
4 |
from text_util_en_pt.cleaner import structurize_text, detect_language, Language
|
@@ -7,6 +7,7 @@ from duckduckgo_search import DDGS
|
|
7 |
import google.generativeai as genai
|
8 |
import gradio as gr
|
9 |
|
|
|
10 |
gemini_key = os.environ.get("GEMINI_KEY")
|
11 |
genai.configure(api_key=gemini_key)
|
12 |
gemini = genai.GenerativeModel('gemini-pro')
|
|
|
1 |
+
import time, os, multiprocessing, torch
|
2 |
from minivectordb.embedding_model import EmbeddingModel
|
3 |
from minivectordb.vector_database import VectorDatabase
|
4 |
from text_util_en_pt.cleaner import structurize_text, detect_language, Language
|
|
|
7 |
import google.generativeai as genai
|
8 |
import gradio as gr
|
9 |
|
10 |
+
torch.set_num_threads(2)
|
11 |
gemini_key = os.environ.get("GEMINI_KEY")
|
12 |
genai.configure(api_key=gemini_key)
|
13 |
gemini = genai.GenerativeModel('gemini-pro')
|