Spaces:
Runtime error
Runtime error
Added video demo
Browse files16 unmodified lines17181920212244 unmodified lines676869707172737475767778798081828384858687888916 unmodified linesst.title("Web Scraping Assistant")st.write("This app helps you to extract data from HTML code using web scraping. It uses GPT-3.5-turbo to generate the code for you.")st.write("Contribute to this project on [GitHub](https://github.com/CognitiveLabs/GPT-auto-webscraping)")if assistant_api_key == '':assistant_api_key = st.text_input("Paste your API key here:")if assistant_api_key:44 unmodified lineselse:st.write("error extracting data")with st.expander(label="How to use this app"):st.write("1. Paste the html code of your target element in the first text box and press \"Enter\"")example = st.button("Show example")if example:example = Falsetext_area = st.text_area("Example", value='<li><div class="product"> <h3 class="title">Product 1</h3> <p class="description">This is the description of the product 1</p> <span class="price">10.00</span> </div></li>')close_example = st.button("Close example")if close_example:example = Falseclose_example.disabled = Truetext_area = Nonest.write("2. Click on the button 'Extract data format'")st.write("3. Click on the button 'Generate the code'")st.write("4. Paste the complete html code in the last text box to test the auto generated code")st.write("5. Copy the code and include it in your own projects")16 unmodified lines171819202122232425262728293044 unmodified lines75767716 unmodified linesst.title("Web Scraping Assistant")st.write("This app helps you to extract data from HTML code using web scraping. It uses GPT-3.5-turbo to generate the code for you.")st.write("Contribute to this project on [GitHub](https://github.com/CognitiveLabs/GPT-auto-webscraping)")with st.expander(label="Check out the video demo"):video_file = open('demo.mp4', 'rb')video_bytes = video_file.read()st.video(video_bytes)if assistant_api_key == '':assistant_api_key = st.text_input("Paste your API key here:")if assistant_api_key:44 unmodified lineselse:st.write("error extracting data")
app.py+8-20