Spaces:
Running
Running
-- Added an accordion to show instruction on how to use this app
Browse files-- Autofocus the url input textbox after page loading is completed.
app.py
CHANGED
|
@@ -156,30 +156,23 @@ with gr.Blocks() as gradio_ui:
|
|
| 156 |
</div>
|
| 157 |
""")
|
| 158 |
|
| 159 |
-
gr.
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
<br />
|
| 173 |
-
|
| 174 |
-
<p><strong>What makes this different from a regular web scraper?</strong> </p>
|
| 175 |
-
|
| 176 |
-
<p>Traditional web scrapers require pre-programming to extract product data for each specific website. These scrapers are brittle and can break if the website's design changes. This app uses LLMs to <em>understand</em> your query and extract only the relevant information, saving you time and effort and removing the need for constant maintenance.</p>
|
| 177 |
-
</div>
|
| 178 |
-
""")
|
| 179 |
|
| 180 |
|
| 181 |
with gr.Column():
|
| 182 |
-
url_input = gr.Textbox(label="Enter URL to scrape", placeholder="https://example.com/query?search=cat+food")
|
| 183 |
query_input = gr.Textbox(label="What information do you want to find?", placeholder="Find product name, price, rating etc. / Summarize the content of this page")
|
| 184 |
|
| 185 |
with gr.Row():
|
|
|
|
| 156 |
</div>
|
| 157 |
""")
|
| 158 |
|
| 159 |
+
with gr.Accordion("ℹ️ How to Use This App", open=False):
|
| 160 |
+
gr.Markdown("""
|
| 161 |
+
This app combines web scraping with the power of Large Language Models (LLMs) to extract specific information from web pages. Here's how it works:
|
| 162 |
+
1. **Enter a URL:** Provide the URL of the web page you want to analyze.
|
| 163 |
+
2. **Define Your Query:** Specify the exact information you're looking for (e.g., product name, price, customer ratings).
|
| 164 |
+
3. **Scrape the Web Page:** Choose a scraper and click the "Scrape Website" button to extract the content of the page.
|
| 165 |
+
4. **Select Model & Provider:** Choose the LLM model you want to use for information extraction.
|
| 166 |
+
5. **Extract Info by LLM:** Click the "Extract Info by LLM" button to get the information based on your query.
|
| 167 |
+
|
| 168 |
+
---
|
| 169 |
+
**What makes this different from a regular web scraper?**
|
| 170 |
+
Traditional web scrapers require pre-programming to extract product data for each specific website. These scrapers are brittle and can break if the website's design changes. This app uses LLMs to <em>understand</em> your query and extract only the relevant information, saving you time and effort and removing the need for constant maintenance.
|
| 171 |
+
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 172 |
|
| 173 |
|
| 174 |
with gr.Column():
|
| 175 |
+
url_input = gr.Textbox(label="Enter URL to scrape", placeholder="https://example.com/query?search=cat+food", autofocus=True)
|
| 176 |
query_input = gr.Textbox(label="What information do you want to find?", placeholder="Find product name, price, rating etc. / Summarize the content of this page")
|
| 177 |
|
| 178 |
with gr.Row():
|