Download app.py from ashwinncj/basic-01: direct link, hf CLI and curl.
- Browser
- Download file 320 Bytes
-
https://huggingface.co/spaces/ashwinncj/basic-01/resolve/main/app.py
- Command line
-
hf download hf://spaces/ashwinncj/basic-01/app.py
-
curl -L -o app.py https://huggingface.co/spaces/ashwinncj/basic-01/resolve/main/app.py
320 Bytes
| # Use a pipeline as a high-level helper | |
| from transformers import pipeline | |
| # import streamlit | |
| import streamlit as st | |
| pipe = pipeline("text-generation", model="OpenAssistant/codellama-13b-oasst-sft-v10") | |
| user_input = st.text_input("Enter a prompt:") | |
| if user_input: | |
| response = pipe(user_input) | |
| st.write(response) |