oasst-pythia-12b· LAION (OpenAssistant models)
Arena Human Preference 55K
can you give a example with streamlit?
- User
can you give a example with streamlit?
- Assistant
Sure! Here's an example of how to use Streamlit with a GPT-3 model:
from streamlit import StreamlitApp from streamlit.ui import Text, Button app = StreamlitApp() @app.stream def gpt_3_stream(prompt): model = GPT3.from_pretrained("gpt-3-large") output = model(prompt) return output @app.button(text="Generate Text", button_type="secondary") def generate_text(): prompt = Text("Generate text").render() response = gpt_3_stream(prompt) print(response) app.run(debug=True)This example uses the
GPT3.from_pretrainedfunction to load a pre-trained model and thegpt_3_streamfunction to generate text based on a prompt. TheButtoncomponent is used to trigger the generate text action, and theTextcomponent is used to render the prompt.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.