Spaces:
Runtime error
Runtime error
chnages added gradio
Browse files- app/gradio_ui.py +1 -1
- app/main.py +10 -0
app/gradio_ui.py
CHANGED
|
@@ -3,7 +3,7 @@ import requests
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
# βββ Config βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 6 |
-
BASE_URL = "https://
|
| 7 |
|
| 8 |
|
| 9 |
# βββ Theme: dark navy / electric-blue, matching the HTML frontend β
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
|
| 5 |
# βββ Config βββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 6 |
+
BASE_URL = "https://vinit006-emailagentwithmemory.hf.space"
|
| 7 |
|
| 8 |
|
| 9 |
# βββ Theme: dark navy / electric-blue, matching the HTML frontend β
|
app/main.py
CHANGED
|
@@ -18,6 +18,8 @@ from app.database.models import User
|
|
| 18 |
from app.utils.email_encode import encode_email_for_namespace
|
| 19 |
from app.core.auth import create_access_token,get_current_user
|
| 20 |
import traceback
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# CREATE GMAIL AUTH FILES FROM HF SECRETS
|
| 23 |
|
|
@@ -253,6 +255,14 @@ def send_email(request: SendEmailRequest,db: Session = Depends(get_session),curr
|
|
| 253 |
|
| 254 |
|
| 255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 256 |
# used for local testing
|
| 257 |
|
| 258 |
# if __name__ == "__main__":
|
|
|
|
| 18 |
from app.utils.email_encode import encode_email_for_namespace
|
| 19 |
from app.core.auth import create_access_token,get_current_user
|
| 20 |
import traceback
|
| 21 |
+
import gradio as gr
|
| 22 |
+
from app.gradio_ui import build_demo
|
| 23 |
|
| 24 |
# CREATE GMAIL AUTH FILES FROM HF SECRETS
|
| 25 |
|
|
|
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
+
# adjust import path to wherever you place gradio_ui.py
|
| 259 |
+
|
| 260 |
+
|
| 261 |
+
demo = build_demo()
|
| 262 |
+
|
| 263 |
+
# Mounts the Gradio UI at /ui β e.g. https://vinit006-emailagentwithmemory.hf.space/ui
|
| 264 |
+
app = gr.mount_gradio_app(app, demo, path="/ui")
|
| 265 |
+
|
| 266 |
# used for local testing
|
| 267 |
|
| 268 |
# if __name__ == "__main__":
|