Spaces:
Running
Running
Pygmales commited on
Commit ·
ccf217e
1
Parent(s): b482b16
entrypoint in app.py
Browse files- .gitignore +1 -0
- app.py +12 -1
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
__pycache__/
|
|
|
|
|
|
| 1 |
__pycache__/
|
| 2 |
+
.env
|
app.py
CHANGED
|
@@ -1,9 +1,15 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
| 2 |
from src.rag.agent_chain import ExecutiveAgentChain
|
| 3 |
-
from src.utils.logging import get_logger,
|
| 4 |
|
|
|
|
| 5 |
logger = get_logger("chatbot_app")
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
class ChatbotApplication:
|
| 8 |
def __init__(self, language: str = 'de') -> None:
|
| 9 |
self._app = gr.Blocks()
|
|
@@ -117,3 +123,8 @@ class ChatbotApplication:
|
|
| 117 |
|
| 118 |
def run(self):
|
| 119 |
self._app.launch(share=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import langsmith
|
| 3 |
+
from langsmith import traceable
|
| 4 |
from src.rag.agent_chain import ExecutiveAgentChain
|
| 5 |
+
from src.utils.logging import get_logger, init_logging
|
| 6 |
|
| 7 |
+
init_logging(interactive_mode=False)
|
| 8 |
logger = get_logger("chatbot_app")
|
| 9 |
|
| 10 |
+
from dotenv import load_dotenv
|
| 11 |
+
load_dotenv()
|
| 12 |
+
|
| 13 |
class ChatbotApplication:
|
| 14 |
def __init__(self, language: str = 'de') -> None:
|
| 15 |
self._app = gr.Blocks()
|
|
|
|
| 123 |
|
| 124 |
def run(self):
|
| 125 |
self._app.launch(share=False)
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
if __name__ == '__main__':
|
| 129 |
+
app = ChatbotApplication('de')
|
| 130 |
+
app.run()
|