Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ from langchain.chat_models import init_chat_model
|
|
| 5 |
from langchain_community.utilities import SQLDatabase
|
| 6 |
from langchain_community.agent_toolkits import SQLDatabaseToolkit
|
| 7 |
from langchain.agents import create_agent
|
|
|
|
| 8 |
# from google.colab import userdata
|
| 9 |
|
| 10 |
# --- GLOBALS ---
|
|
@@ -29,6 +30,10 @@ PROVIDER_MODELS = {
|
|
| 29 |
def create_chatbot_interface():
|
| 30 |
with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Noto Sans")]),
|
| 31 |
css='footer {visibility: hidden}') as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
with gr.Row():
|
| 33 |
with gr.Column(scale=1):
|
| 34 |
gr.Markdown("## LLM Setup")
|
|
@@ -46,7 +51,7 @@ def create_chatbot_interface():
|
|
| 46 |
gr.Markdown("## Database Connection")
|
| 47 |
db_connection_string = gr.Textbox(label="Enter Connection String", type="password")
|
| 48 |
connect_db_btn = gr.Button("Connect to Database")
|
| 49 |
-
db_status = gr.Markdown("")
|
| 50 |
|
| 51 |
with gr.Column(scale=2):
|
| 52 |
gr.Markdown("## Chatbot Interface")
|
|
|
|
| 5 |
from langchain_community.utilities import SQLDatabase
|
| 6 |
from langchain_community.agent_toolkits import SQLDatabaseToolkit
|
| 7 |
from langchain.agents import create_agent
|
| 8 |
+
import markdown as md
|
| 9 |
# from google.colab import userdata
|
| 10 |
|
| 11 |
# --- GLOBALS ---
|
|
|
|
| 30 |
def create_chatbot_interface():
|
| 31 |
with gr.Blocks(theme=gr.themes.Ocean(font=[gr.themes.GoogleFont("Noto Sans")]),
|
| 32 |
css='footer {visibility: hidden}') as demo:
|
| 33 |
+
|
| 34 |
+
with gr.Accordion("📔 Description:", open=False):
|
| 35 |
+
gr.Markdown(md.description)
|
| 36 |
+
|
| 37 |
with gr.Row():
|
| 38 |
with gr.Column(scale=1):
|
| 39 |
gr.Markdown("## LLM Setup")
|
|
|
|
| 51 |
gr.Markdown("## Database Connection")
|
| 52 |
db_connection_string = gr.Textbox(label="Enter Connection String", type="password")
|
| 53 |
connect_db_btn = gr.Button("Connect to Database")
|
| 54 |
+
db_status = gr.Markdown("")
|
| 55 |
|
| 56 |
with gr.Column(scale=2):
|
| 57 |
gr.Markdown("## Chatbot Interface")
|