Spaces:
Runtime error
Runtime error
Upload folder using huggingface_hub
Browse files- README.md +1 -1
- app/main.py +4 -0
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: discord-bot
|
| 3 |
-
app_file: app/
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 4.33.0
|
| 6 |
---
|
|
|
|
| 1 |
---
|
| 2 |
title: discord-bot
|
| 3 |
+
app_file: app/main.py
|
| 4 |
sdk: gradio
|
| 5 |
sdk_version: 4.33.0
|
| 6 |
---
|
app/main.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import logging
|
| 2 |
|
| 3 |
from fastapi import FastAPI
|
|
|
|
| 4 |
|
| 5 |
from app._config import settings
|
| 6 |
from app.components.embedding.component import EmbeddingComponent
|
|
@@ -36,3 +37,6 @@ if settings.IS_UI_ENABLED:
|
|
| 36 |
|
| 37 |
ui = PrivateGptUi(ingest_service, chat_service)
|
| 38 |
ui.mount_in_app(app, settings.UI_PATH)
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import logging
|
| 2 |
|
| 3 |
from fastapi import FastAPI
|
| 4 |
+
import gradio as gr
|
| 5 |
|
| 6 |
from app._config import settings
|
| 7 |
from app.components.embedding.component import EmbeddingComponent
|
|
|
|
| 37 |
|
| 38 |
ui = PrivateGptUi(ingest_service, chat_service)
|
| 39 |
ui.mount_in_app(app, settings.UI_PATH)
|
| 40 |
+
|
| 41 |
+
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
|
| 42 |
+
app = gr.mount_gradio_app(app, io, settings.UI_PATH)
|