-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_streamlit.sh
More file actions
executable file
Β·43 lines (35 loc) Β· 1.26 KB
/
run_streamlit.sh
File metadata and controls
executable file
Β·43 lines (35 loc) Β· 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# RAG QA System - Streamlit Launcher
echo "π€ Starting RAG QA System with Streamlit..."
# Check if Python is available
if ! command -v python3 &> /dev/null; then
echo "β Python3 is not installed. Please install Python 3.8+ first."
exit 1
fi
# Check if uv is available
if ! command -v uv &> /dev/null; then
echo "β uv is not installed. Please install uv first."
echo " pip install uv"
exit 1
fi
# Set uv virtual environment path
export UV_VENV_PATH="/home/fg12/envs/"
# Install dependencies if pyproject.toml exists
if [ -f "pyproject.toml" ]; then
echo "π¦ Installing dependencies with uv..."
uv sync
else
echo "β οΈ pyproject.toml not found. Installing basic dependencies..."
uv add streamlit torch transformers sentence-transformers scikit-learn numpy pandas
fi
# Check if streamlit app exists
if [ ! -f "streamlit_app.py" ]; then
echo "β streamlit_app.py not found. Please ensure the file exists in the current directory."
exit 1
fi
# Run Streamlit
echo "π Launching Streamlit application..."
echo "π± The app will open in your browser at http://localhost:8501"
echo "π Press Ctrl+C to stop the application"
echo ""
uv run streamlit run streamlit_app.py --server.port 8501 --server.address localhost