jncraton / languagemodels

Explore large language models in 512MB of RAM
https://jncraton.github.io/languagemodels/
MIT License
1.18k stars 78 forks source link

Web UI feature request #1

Closed shamio closed 1 year ago

shamio commented 1 year ago

This code looks so good and it would be so nice if we can access it in a web user interface locally instead of using python directly in the DOS mode and typing lm.do(" and such codes. Is there any chance you add this feature to this code and make it something like the demo you've sent in reddit ? (https://jncraton-languagemodels-examplesstreamlitchat-s4uj7z.streamlit.app/)

jncraton commented 1 year ago

There are currently two demos with web UIs that you could run locally. They both use Streamlit. You should be able to run them locally as follows:

  1. Clone this repository: git clone https://github.com/jncraton/languagemodels
  2. Install streamlit: pip3 install streamlit
  3. Run one of the examples: streamlit run examples/streamlit.py
shamio commented 1 year ago

3. streamlit run examples/streamlit.py

I followed the steps and after running the 3rs step, i get this error:

Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for help.

Error: Invalid value: File does not exist: examples/streamlit.py
jncraton commented 1 year ago

You need the example file to be available at the specified path. You can do that either by cloning this repo and changing to it's root directory, or you can download the file directly and place it where you'd like. You should then be able to run the file using streamlit run {file}.

shamio commented 1 year ago

Thank you for your work!