Skip to content

Commit

Permalink
Merge pull request #26 from cics-syslab/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
calvinchai authored Feb 9, 2024
2 parents 81b263a + ea8949f commit e683132
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MAGI is a python framework for generating programming assignments and autograder

## Quick Start

The easiest way to get started with our application is by using our pre-built Docker image.
The easiest way to get started with our application is by using our pre-built [Docker](https://www.docker.com/) image.

```bash
docker run -d --name magi -p 8501:8501 -v ./settings:/app/settings ghcr.io/cics-syslab/magi:latest
Expand All @@ -42,7 +42,7 @@ services:
## Building from Source
If you prefer to build the application from source, follow the instructions in the [Building from Source](#building-from-source) page.
If you prefer to build the application from source, follow the instructions in the [Build](build) page.
<!--
1. Download the release and unzip it
Expand Down
7 changes: 6 additions & 1 deletion webui/pages/8_Preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,13 @@ def download_section(title, file_path, download_label, content_label=None, key=N
if content_label:
st.write(f"### {content_label}")
if 'zip' in file_path: # For zip files, show file browser
content_dir = os.path.join(os.path.dirname(file_path),actual_folder) if actual_folder else file_path[:-4]
if not os.path.exists(content_dir):
st.warning(f"{content_label} not found.")
return

with st.container(border=True):
st_file_browser(os.path.join(os.path.dirname(file_path),actual_folder) if actual_folder else file_path[:-4], key=key)
st_file_browser(content_dir, key=key)
else: # For other file types, potentially show content directly
if extra_action:
extra_action(file_path)
Expand Down

0 comments on commit e683132

Please sign in to comment.