Skip to content

Streamlit with text query#72

Closed
sahanagujja wants to merge 20 commits intofeature/streamlit-ui-llmfrom
main
Closed

Streamlit with text query#72
sahanagujja wants to merge 20 commits intofeature/streamlit-ui-llmfrom
main

Conversation

@sahanagujja
Copy link
Copy Markdown
Collaborator

Fixes #60

What was changed?
A Streamlit-based front-end was added to the application, enabling users to interact with the assistant through a web interface. The new streamlit_app.py manages user inputs, displays responses, and keeps track of conversation history.

Why was it changed?
To provide a user-friendly way to test and engage with the assistant, transforming backend functionality into a practical, accessible prototype.*

How was it changed?

*- Created the Streamlit app to handle input, output, and session state.

  • Connected existing LLM response logic to the UI for real-time interaction.

  • Added validation and error handling for smoother user experience.

  • Designed UI components to display conversation history and allow continuous chat flow.*

Comment on lines +16 to +87
name: Lint, type-check, and tests
runs-on: ubuntu-latest
timeout-minutes: 45

defaults:
run:
shell: bash -l {0} # login shell so conda is available

steps:
- name: Checkout
uses: actions/checkout@v4

# Set up a fast conda with mamba and create env from environment.yml
- name: Set up Miniforge (Conda + Mamba)
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-version: latest
activate-environment: baio
environment-file: environment.yml
use-mamba: true
auto-activate-base: false

# Optional: cache the conda package cache for faster solves
- name: Cache conda pkgs
uses: actions/cache@v4
with:
path: ~/.conda/pkgs
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
restore-keys: |
${{ runner.os }}-conda-

- name: Show tool versions
run: |
python --version
which python
pip --version || true
conda info
conda list | head -n 50 || true

# Ensure CI tooling is present (in case it's not pinned in environment.yml)
- name: Install CI tools (pre-commit, mypy, pytest, build)
run: |
python -m pip install --upgrade pip
pip install pre-commit mypy pytest build

- name: Pre-commit (formatting & lint)
run: pre-commit run --all-files

- name: Type check (mypy)
run: |
# Adjust the paths to match your code layout
mypy metaseq app

- name: Run unit tests (pytest)
env:
PYTHONWARNINGS: default
run: |
# Run tests if they exist, otherwise just report
if [ -d "tests" ] && [ -n "$(find tests -name 'test_*.py' -o -name '*_test.py')" ]; then
pytest -q --maxfail=1 --disable-warnings
else
echo "No tests found - skipping test execution"
fi

# If a pyproject.toml exists, verify that the project builds
- name: Verify packaging (pyproject)
if: hashFiles('pyproject.toml') != ''
run: |
python -m build
ls -lah dist

No newline at end of file

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 6 months ago

The problem is that the workflow does not explicitly set the permissions for the GITHUB_TOKEN, so it defaults to potentially overly permissive settings. To fix this, you should add a permissions block at either the root of the workflow (above jobs:) or at the job level if job-specific permissions are needed. In this case, contents: read is likely all that is necessary, as the job only reads source code and does not perform any actions that require write access. Add the following block above the jobs: key (and beneath any existing top-level workflow settings such as name, on, concurrency):

permissions:
  contents: read

No additional imports, methods, or dependencies are required, and all changes should be made within the shown .github/workflows/ci.yml snippet.


Suggested changeset 1
.github/workflows/ci.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -11,6 +11,8 @@
   group: ci-${{ github.workflow }}-${{ github.ref }}
   cancel-in-progress: true
 
+permissions:
+  contents: read
 jobs:
   lint-and-test:
     name: Lint, type-check, and tests
EOF
@@ -11,6 +11,8 @@
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
jobs:
lint-and-test:
name: Lint, type-check, and tests
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@sahanagujja sahanagujja closed this Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants