demo_utils.launch_streamlit unable to work on local install of `conversant`
See original GitHub issueIssue Description
The files of conversant
that are installed by pip are only from sandbox-conversant-lib/conversant
.
demo_utils.launch_streamlit
requires app/streamlit_example.py
to be available.
Code to replicate:
pip install conversant
co = cohere.Client("API KEY")
shakespeare_config = {
"preamble": "Below is a conversation between Shakespeare and a Literature Student.",
"example_separator": "<CONVERSATION>\n",
"headers": {
"user": "Literature Student",
"bot": "William Shakespeare",
},
"examples": [
[
{
"user": "Who are you?",
"bot": "Mine own nameth is Shakespeare, and I speaketh in riddles.",
},
]
],
}
shakespeare_bot = PromptChatbot(
client=co,
prompt=ChatPrompt.from_dict(shakespeare_config),
persona_name="william-shakespeare",
)
demo_utils.launch_streamlit(shakespeare_bot)
Error:
Usage: streamlit run [OPTIONS] TARGET [ARGS]...
Try 'streamlit run --help' for help.
Error: Invalid value: File does not exist: /app/streamlit_example.py
One possible solution is to move app/
into conversant
(with a rename), such that streamlit_example.py
is available in the pip installed version of conversant
as conversant/demo/streamlit_example.py
.
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
App is not loading when running remotely - Streamlit Docs
Symptom #1: The app never loads · Try port 80: Some hosts expose port 80 by default. To set Streamlit to use that...
Read more >Getting an error "'streamlit' is not recognized as an internal or ...
Hi,. I was trying to build a streamlit app. Performed the following steps: Activated my own environment using Ananconda prompt; Installed ...
Read more >Unable to install streamlit with conda
I use conda, and pip install streamlit gives me this: ERROR: pydeck 0.3.0 ... page on my browser, but a click on demos...
Read more >Note: installation issues with Python 3.9 and Streamlit
Hi everyone - We're starting to selectively see reports about using Python 3.9 with Streamlit with pip, with compiler errors like the ...
Read more >Cant launch my app - Using Streamlit
Hi I'm new to coding and have just read about stremlit which seems awesome, I have been able to launch the streamlit hello...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes good call! I’m running behind on PR reviews so maybe we remove the example now-ish and add it back in next week alongside the fix
Streamlit app needs to be pointed to
conversant/demo/streamlit_example.py
.https://github.com/cohere-ai/sandbox-conversant-lib/pull/56