Skip to content

Commit

Permalink
chainlit updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkersigirci committed Jan 30, 2025
1 parent 1878e12 commit 0b972f1
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 57 deletions.
116 changes: 65 additions & 51 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Chainlit Mock",
"type": "debugpy",
"request": "launch",
// "program": "${file}",
"console": "integratedTerminal",
"module": "chainlit",
"justMyCode": false,
"args": [
"run",
"--headless",
"--port",
"5000",
// "${file}",
"${workspaceFolder}/src/podflix/gui/mock.py"
],
},
{
"name": "Chainlit Audio",
"type": "debugpy",
"request": "launch",
// "program": "${file}",
"console": "integratedTerminal",
"module": "chainlit",
"justMyCode": false,
"args": [
"run",
"--headless",
"--port",
"5000",
// "${file}",
"${workspaceFolder}/src/podflix/gui/audio.py"
],
},
{
"name": "Debug Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false,
// "env": {
// "PYTHONPATH": "${workspaceFolder}/src"
// },
// "purpose": [
// "debug-in-terminal"
// ],
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Debug Backend",
"type": "debugpy",
"request": "launch",
// "program": "${file}",
"console": "integratedTerminal",
"module": "uvicorn",
"justMyCode": false,
"args": [
"podflix.gui.backend:app",
"--port",
"5000"
],
},
{
"name": "Chainlit Mock",
"type": "debugpy",
"request": "launch",
// "program": "${file}",
"console": "integratedTerminal",
"module": "chainlit",
"justMyCode": false,
"args": [
"run",
"--headless",
"--port",
"5000",
// "${file}",
"${workspaceFolder}/src/podflix/gui/mock.py"
],
},
{
"name": "Chainlit Audio",
"type": "debugpy",
"request": "launch",
// "program": "${file}",
"console": "integratedTerminal",
"module": "chainlit",
"justMyCode": false,
"args": [
"run",
"--headless",
"--port",
"5000",
// "${file}",
"${workspaceFolder}/src/podflix/gui/audio.py"
],
},
{
"name": "Debug Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false,
// "env": {
// "PYTHONPATH": "${workspaceFolder}/src"
// },
// "purpose": [
// "debug-in-terminal"
// ],
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions configs/chainlit/public/copilot.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#cl-shadow-root .copilot-container-expanded {
height: min(900px,calc(100vh - 150px));
}

#cl-shadow-root .copilot-container-collapsed {
width: min(600px,80vw);
}
Binary file modified configs/chainlit/public/logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified configs/chainlit/public/logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies = [
"aiosqlite>=0.20.0",
"asyncpg>=0.30.0",
"boto3>=1.35.92",
"chainlit>=2.0.603",
"chainlit>=2.1.0",
"huggingface-hub>=0.27.0",
"langchain>=0.3.13",
"langchain-community>=0.3.13",
Expand Down
2 changes: 1 addition & 1 deletion src/podflix/gui/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def auth_callback(username: str, password: str):
return simple_auth_callback(username, password)


@cl.step(type="tool", name="Transcribe Audio")
@cl.step(name="Transcribe Audio", type="tool")
async def transcribing_tool(file: BinaryIO | Path):
# NOTE: Workaround to show the tool progres on the ui
step_message = cl.Message(content="")
Expand Down
1 change: 1 addition & 0 deletions src/podflix/gui/fasthtml_ui/copilot.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def get():
Script("""
window.mountChainlitWidget({
chainlitServer: "http://localhost:5000/chat",
customCssUrl: '/public/copilot.css',
});
"""),
)
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0b972f1

Please sign in to comment.