Spaces:
Runtime error
Runtime error
Download app.py from vinayakdev/qa-generator: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/spaces/vinayakdev/qa-generator/resolve/a069fc5d90dc51a2f67879e7c86780a65bb7d196/app.py
- Command line
-
hf download hf://spaces/vinayakdev/qa-generator@a069fc5d90dc51a2f67879e7c86780a65bb7d196/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vinayakdev/qa-generator/resolve/a069fc5d90dc51a2f67879e7c86780a65bb7d196/app.py
530 Bytes
| import streamlit as st | |
| import generator | |
| from generator import * | |
| import string | |
| st.info("Enter short paragraphs, please, to get better answers.\n") | |
| text_ar = st.text_area("Enter text:") | |
| col1, col2, col3 = st.columns([2,1,2]) | |
| if(col2.button("Generate!")): | |
| text_ar = text_ar.replace("\n", " ") | |
| text_ar = text_ar.split('.') | |
| for text in text_ar : | |
| if text.isspace() or len(text) == 0: | |
| continue | |
| pairs = creator(text) | |
| for pair in pairs: | |
| st.text(pair) | |
| st.balloons() | |