Skip to content

Commit

Permalink
Add a minimal user interface for developer.
Browse files Browse the repository at this point in the history
auto-sync-2024-06-18-21-04-23
  • Loading branch information
shaoyijia authored Jul 5, 2024
2 parents 6649139 + b42ad98 commit 72aebfd
Show file tree
Hide file tree
Showing 13 changed files with 1,016 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ Please cite our paper if you use this code or part of it in your work:
year={2024},
booktitle={Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)}
}
```
```
10 changes: 10 additions & 0 deletions frontend/demo_light/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[client]
showErrorDetails = false
toolbarMode = "minimal"

[theme]
primaryColor = "#F63366"
backgroundColor = "#FFFFFF"
secondaryBackgroundColor = "#F0F2F6"
textColor = "#262730"
font = "sans serif"
33 changes: 33 additions & 0 deletions frontend/demo_light/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# STORM Minimal User Interface

This is a minimal user interface for `STORMWikiRunner` which includes the following features:
1. Allowing user to create a new article through the "Create New Article" page.
2. Showing the intermediate steps of STORMWikiRunner in real-time when creating an article.
3. Displaying the written article and references side by side.
4. Allowing user to view previously created articles through the "My Articles" page.

<p align="center">
<img src="assets/create_article.jpg" style="width: 70%; height: auto;">
</p>

<p align="center">
<img src="assets/article_display.jpg" style="width: 70%; height: auto;">
</p>

## Setup
1. Besides the required packages for `STORMWikiRunner`, you need to install additional packages:
```bash
pip install -r requirements.txt
```
2. Make sure you set up the API keys following the instructions in the main README file. Create a copy of `secrets.toml` and place it under `.streamlit/`.
3. Run the following command to start the user interface:
```bash
streamlit run storm.py
```
The user interface will create a `DEMO_WORKING_DIR` directory in the current directory to store the outputs.

## Customization

You can customize the `STORMWikiRunner` powering the user interface according to [the guidelines](https://github.com/stanford-oval/storm?tab=readme-ov-file#customize-storm) in the main README file.

The `STORMWikiRunner` is initialized in `set_storm_runner()` in [demo_util.py](demo_util.py). You can change `STORMWikiRunnerArguments`, `STORMWikiLMConfigs`, or use a different retrieval model according to your need.
Binary file added frontend/demo_light/assets/article_display.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/demo_light/assets/create_article.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/demo_light/assets/void.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 72aebfd

Please sign in to comment.