Update app.py
Browse files
app.py
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
|
|
| 1 |
import re, uuid
|
| 2 |
import json, logging
|
| 3 |
import gradio as gr
|
| 4 |
from typing import List, Dict
|
| 5 |
-
|
| 6 |
from data.css import custom_css
|
| 7 |
from src.controller.agent_cacher import AgentManager
|
| 8 |
# Configure logging
|
| 9 |
logging.basicConfig(level=logging.INFO, format="-->%(asctime)s [%(levelname)s] %(message)s")
|
| 10 |
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
|
|
@@ -72,5 +74,6 @@ def create_gradio_interface():
|
|
| 72 |
|
| 73 |
return demo
|
| 74 |
if __name__ == "__main__":
|
|
|
|
| 75 |
interface = create_gradio_interface()
|
| 76 |
interface.launch(auth=auth_users)
|
|
|
|
| 1 |
+
import os
|
| 2 |
import re, uuid
|
| 3 |
import json, logging
|
| 4 |
import gradio as gr
|
| 5 |
from typing import List, Dict
|
| 6 |
+
from dotenv import load_dotenv
|
| 7 |
from data.css import custom_css
|
| 8 |
from src.controller.agent_cacher import AgentManager
|
| 9 |
# Configure logging
|
| 10 |
logging.basicConfig(level=logging.INFO, format="-->%(asctime)s [%(levelname)s] %(message)s")
|
| 11 |
|
| 12 |
+
load_dotenv()
|
| 13 |
|
| 14 |
|
| 15 |
|
|
|
|
| 74 |
|
| 75 |
return demo
|
| 76 |
if __name__ == "__main__":
|
| 77 |
+
auth_users = [(os.environ["GRADIO_USER"], os.environ["GRADIO_PASS"])]
|
| 78 |
interface = create_gradio_interface()
|
| 79 |
interface.launch(auth=auth_users)
|