Cry4nide commited on
Commit
c8114a5
·
1 Parent(s): f571567

Added video demo

Browse files
Files changed (1) hide show
  1. app.py +8 -20
app.py CHANGED
@@ -17,6 +17,14 @@ os.environ["LANGCHAIN_PROJECT"]=st.secrets["LANGCHAIN_PROJECT"]
17
  st.title("Web Scraping Assistant")
18
  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.")
19
  st.write("Contribute to this project on [GitHub](https://github.com/CognitiveLabs/GPT-auto-webscraping)")
 
 
 
 
 
 
 
 
20
  if assistant_api_key == '':
21
  assistant_api_key = st.text_input("Paste your API key here:")
22
  if assistant_api_key:
@@ -67,23 +75,3 @@ if 'code_generated' in st.session_state:
67
  else:
68
  st.write("error extracting data")
69
 
70
- with st.expander(label="How to use this app"):
71
-
72
- st.write("1. Paste the html code of your target element in the first text box and press \"Enter\"")
73
- example = st.button("Show example")
74
- if example:
75
- example = False
76
- text_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>')
77
- close_example = st.button("Close example")
78
- if close_example:
79
- example = False
80
- close_example.disabled = True
81
- text_area = None
82
-
83
- st.write("2. Click on the button 'Extract data format'")
84
-
85
- st.write("3. Click on the button 'Generate the code'")
86
-
87
- st.write("4. Paste the complete html code in the last text box to test the auto generated code")
88
-
89
- st.write("5. Copy the code and include it in your own projects")
 
17
  st.title("Web Scraping Assistant")
18
  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.")
19
  st.write("Contribute to this project on [GitHub](https://github.com/CognitiveLabs/GPT-auto-webscraping)")
20
+
21
+ with st.expander(label="Check out the video demo"):
22
+ video_file = open('demo.mp4', 'rb')
23
+ video_bytes = video_file.read()
24
+
25
+ st.video(video_bytes)
26
+
27
+
28
  if assistant_api_key == '':
29
  assistant_api_key = st.text_input("Paste your API key here:")
30
  if assistant_api_key:
 
75
  else:
76
  st.write("error extracting data")
77