Spaces:
Runtime error
Runtime error
Update envConfig.py
Browse files- envConfig.py +14 -2
envConfig.py
CHANGED
|
@@ -1,10 +1,8 @@
|
|
| 1 |
import os
|
| 2 |
-
import gradio as gr
|
| 3 |
import tempfile
|
| 4 |
|
| 5 |
from dotenv import load_dotenv
|
| 6 |
|
| 7 |
-
|
| 8 |
#******************************************************************************************************************************************************************
|
| 9 |
|
| 10 |
class envConfiguration:
|
|
@@ -19,6 +17,14 @@ class envConfiguration:
|
|
| 19 |
os.environ["PINECONE_KEY"] = pinecone_key
|
| 20 |
os.environ["PINECONE_ENV"] = pinecone_env
|
| 21 |
os.environ["PINECONE_IND"] = pinecone_index
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
os.environ["OUTPUT_DIR"] = os.path.join(tempfile.gettempdir(),
|
| 23 |
'rkk-document-gpt',
|
| 24 |
'output'
|
|
@@ -44,5 +50,11 @@ class envConfiguration:
|
|
| 44 |
def pinecone_index(self):
|
| 45 |
return os.environ.get("PINECONE_IND")
|
| 46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
def output_dir(self):
|
| 48 |
return os.environ.get("OUTPUT_DIR")
|
|
|
|
| 1 |
import os
|
|
|
|
| 2 |
import tempfile
|
| 3 |
|
| 4 |
from dotenv import load_dotenv
|
| 5 |
|
|
|
|
| 6 |
#******************************************************************************************************************************************************************
|
| 7 |
|
| 8 |
class envConfiguration:
|
|
|
|
| 17 |
os.environ["PINECONE_KEY"] = pinecone_key
|
| 18 |
os.environ["PINECONE_ENV"] = pinecone_env
|
| 19 |
os.environ["PINECONE_IND"] = pinecone_index
|
| 20 |
+
os.environ["INPUT_DIR"] = os.path.join(tempfile.gettempdir(),
|
| 21 |
+
'rkk-document-gpt',
|
| 22 |
+
'input'
|
| 23 |
+
)
|
| 24 |
+
os.environ["TEMPLATE_DIR"] = os.path.join(tempfile.gettempdir(),
|
| 25 |
+
'rkk-document-gpt',
|
| 26 |
+
'template'
|
| 27 |
+
)
|
| 28 |
os.environ["OUTPUT_DIR"] = os.path.join(tempfile.gettempdir(),
|
| 29 |
'rkk-document-gpt',
|
| 30 |
'output'
|
|
|
|
| 50 |
def pinecone_index(self):
|
| 51 |
return os.environ.get("PINECONE_IND")
|
| 52 |
|
| 53 |
+
def input_dir(self):
|
| 54 |
+
return os.environ.get("INPUT_DIR")
|
| 55 |
+
|
| 56 |
+
def template_dir(self):
|
| 57 |
+
return os.environ.get("TEMPLATE_DIR")
|
| 58 |
+
|
| 59 |
def output_dir(self):
|
| 60 |
return os.environ.get("OUTPUT_DIR")
|