diff --git a/.github/workflows/cdci.yml b/.github/workflows/cdci.yml index 2e67432..f15e1c1 100644 --- a/.github/workflows/cdci.yml +++ b/.github/workflows/cdci.yml @@ -155,7 +155,7 @@ jobs: - name: Build executable run: | cd gui - pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pyvis --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py + pyinstaller -n vuegen_gui --onefile --windowed --collect-all pyvis --collect-all streamlit --collect-all st_aggrid --collect-all customtkinter --collect-all quarto_cli --collect-all plotly --collect-all _plotly_utils --collect-all traitlets --collect-all referencing --collect-all rpds --collect-all tenacity --collect-all pandas --collect-all numpy --collect-all matplotlib --collect-all openpyxl --collect-all xlrd --collect-all nbformat --collect-all nbclient --collect-all altair --collect-all itables --collect-all kaleido --collect-all pyarrow --collect-all dataframe_image --collect-all narwhals --collect-all PIL --collect-all vl_convert --collect-all typing-extensions --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook --add-data ../docs/images/vuegen_logo.png:. app.py # --windowed only for mac, see: # https://pyinstaller.org/en/stable/usage.html#building-macos-app-bundles # 'Under macOS, PyInstaller always builds a UNIX executable in dist.' diff --git a/README.md b/README.md index 5352992..ced3b21 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ vuegen --directory docs/example_data/Earth_microbiome_vuegen_demo_notebook --rep Your input directory must follow a **nested folder structure**, where first-level folders are treated as **sections** and second-level folders as **subsections**, containing the components (plots, tables, networks, Markdown text, and HTML files). Here is an example layout: + ``` report_folder/ ├── section1/ @@ -138,7 +139,7 @@ report_folder/ > [!WARNING] > VueGen currently requires each section to contain at least one subsection folder. Defining only sections (with no subsections) or using deeper nesting levels (i.e., sub-subsections) will result in errors. In upcoming releases, we plan to support more flexible directory structures. -The titles for sections, subsections, and components are extracted from the corresponding folder and file names, and afterward, users can add descriptions, captions, and other details to the configuration file. Component types are inferred from the file extensions and names. +The titles for sections, subsections, and components are extracted from the corresponding folder and file names, and afterward, users can add descriptions, captions, and other details to the configuration file. Component types are inferred from the file extensions and names. The order of sections, subsections, and components can be defined using numerical suffixes in folder and file names. It's also possible to provide a configuration file instead of a directory: @@ -206,6 +207,10 @@ from the releases page according to your operating system. ```bash conda create -n vuegen_gui -c conda-forge python=3.12 jupyter +# in case you have errors, install vuegen addtionally +conda activate vuegen_gui +pip install vuegen +# list all conda environments to find the location of the environment conda info -e # find environment location ``` @@ -254,28 +259,28 @@ This advanced case study demonstrates the application of VueGen in a real-world **3. ChatBot Component** -This case study highlights VueGen’s capability to embed a chatbot component into a report subsection, +This case study highlights VueGen’s capability to embed a chatbot component into a report subsection, enabling interactive conversations inside the report. Two API modes are supported: - **Ollama-style streaming chat completion** -If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint][ollama_chat]. -Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience. -This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`. + If a `model` parameter is specified in the config file, VueGen assumes the chatbot is using Ollama’s [/api/chat endpoint][ollama_chat]. + Messages are handled as chat history, and the assistant responses are streamed in real time for a smooth and responsive experience. + This mode supports LLMs such as `llama3`, `deepsek`, or `mistral`. > [!TIP] > See [Ollama’s website][ollama] for more details. - **Standard prompt-response API** -If no `model` is provided, VueGen uses a simpler prompt-response flow. -A single prompt is sent to an endpoint, and a structured JSON object is expected in return. -Currently, the response can include: + If no `model` is provided, VueGen uses a simpler prompt-response flow. + A single prompt is sent to an endpoint, and a structured JSON object is expected in return. + Currently, the response can include: - `text`: the main textual reply - `links`: a list of source URLs (optional) - `HTML content`: an HTML snippet with a Pyvis network visualization (optional) -This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed +This response structure is currently customized for an internal knowledge graph assistant, but VueGen is being actively developed to support more flexible and general-purpose response formats in future releases. > [!NOTE] diff --git a/gui/Makefile b/gui/Makefile index 57faced..4688457 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -37,6 +37,7 @@ bundle: --collect-all rpds \ --collect-all tenacity \ --collect-all vl_convert \ + --collect-all typing-extensions \ --add-data ../docs/example_data/Basic_example_vuegen_demo_notebook:example_data/Basic_example_vuegen_demo_notebook \ --add-data ../docs/images/vuegen_logo.png:. \ app.py @@ -80,7 +81,6 @@ bundle: # --collect-all urllib3 \ # --collect-all uri-template \ # --collect-all tzdata \ -# --collect-all typing-extensions\ # --collect-all types-python-dateutil \ # --collect-all traitlets \ # --collect-all tornado \ diff --git a/gui/app.py b/gui/app.py index ee993b3..f0a68c0 100644 --- a/gui/app.py +++ b/gui/app.py @@ -170,7 +170,7 @@ def inner(): f"\n\nConfiguration file at:\n{gen_config_path}", ) global hash_config_app # ! fix this - get_completion_message(report_type.get()) + get_completion_message(report_type.get(), config_path=gen_config_path) if hash(yaml.dump(config_app)) != hash_config_app: with open(config_file, "w", encoding="utf-8") as f: yaml.dump(config_app, f)