Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,16 +2,16 @@ import os
|
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
from langchain_community.utilities import SQLDatabase
|
| 4 |
load_dotenv()
|
| 5 |
-
db_uri = os.getenv("DB_CONNECTION_STRING"
|
| 6 |
db_final = SQLDatabase.from_uri(db_uri)
|
| 7 |
import gradio as gr
|
| 8 |
from file_upload import FileHandler
|
| 9 |
from chat import ChatHandler
|
| 10 |
|
| 11 |
# Initialize the FileHandler inline
|
| 12 |
-
VECTOR_DB_PATH = os.getenv("VECTOR_DB_PATH_DB"
|
| 13 |
-
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY"
|
| 14 |
-
GROK_API_KEY = os.getenv("GROK_API_KEY"
|
| 15 |
|
| 16 |
# Initialize FileHandler and ChatHandler
|
| 17 |
file_handler = FileHandler(VECTOR_DB_PATH, OPENAI_API_KEY, GROK_API_KEY)
|
|
|
|
| 2 |
from dotenv import load_dotenv
|
| 3 |
from langchain_community.utilities import SQLDatabase
|
| 4 |
load_dotenv()
|
| 5 |
+
db_uri = os.getenv("DB_CONNECTION_STRING")
|
| 6 |
db_final = SQLDatabase.from_uri(db_uri)
|
| 7 |
import gradio as gr
|
| 8 |
from file_upload import FileHandler
|
| 9 |
from chat import ChatHandler
|
| 10 |
|
| 11 |
# Initialize the FileHandler inline
|
| 12 |
+
VECTOR_DB_PATH = os.getenv("VECTOR_DB_PATH_DB")
|
| 13 |
+
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
| 14 |
+
GROK_API_KEY = os.getenv("GROK_API_KEY")
|
| 15 |
|
| 16 |
# Initialize FileHandler and ChatHandler
|
| 17 |
file_handler = FileHandler(VECTOR_DB_PATH, OPENAI_API_KEY, GROK_API_KEY)
|