Spaces:
Runtime error
Runtime error
Added instructions to streamlit main page
Browse files
app.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
| 1 |
from AssistantService import GPTAssistant
|
| 2 |
from openai.error import AuthenticationError
|
| 3 |
import streamlit as st
|
| 4 |
-
import analytics.gs as ga_tag
|
| 5 |
import configparser
|
| 6 |
|
| 7 |
config = configparser.ConfigParser()
|
|
@@ -61,6 +60,23 @@ if 'code_generated' in st.session_state:
|
|
| 61 |
else:
|
| 62 |
st.write("error extracting data")
|
| 63 |
|
|
|
|
| 64 |
|
| 65 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from AssistantService import GPTAssistant
|
| 2 |
from openai.error import AuthenticationError
|
| 3 |
import streamlit as st
|
|
|
|
| 4 |
import configparser
|
| 5 |
|
| 6 |
config = configparser.ConfigParser()
|
|
|
|
| 60 |
else:
|
| 61 |
st.write("error extracting data")
|
| 62 |
|
| 63 |
+
st.title("How to use this app")
|
| 64 |
|
| 65 |
+
st.write("1. Paste the html code of your target element in the first text box and press \"Enter\"")
|
| 66 |
+
example = st.button("Show example")
|
| 67 |
+
if example:
|
| 68 |
+
example = False
|
| 69 |
+
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>')
|
| 70 |
+
close_example = st.button("Close example")
|
| 71 |
+
if close_example:
|
| 72 |
+
example = False
|
| 73 |
+
close_example.disabled = True
|
| 74 |
+
text_area = None
|
| 75 |
|
| 76 |
+
st.write("2. Click on the button 'Extract data format'")
|
| 77 |
+
|
| 78 |
+
st.write("3. Click on the button 'Generate the code'")
|
| 79 |
+
|
| 80 |
+
st.write("4. Paste the complete html code in the last text box to test the auto generated code")
|
| 81 |
+
|
| 82 |
+
st.write("5. Copy the code and include it in your own projects")
|