Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,9 @@ st.title("Course Scraper from Analytics Vidhya")
|
|
| 18 |
# API Key Input
|
| 19 |
api_key = st.text_input("Enter your API Key:", type="password")
|
| 20 |
|
|
|
|
|
|
|
|
|
|
| 21 |
# Scraping Configuration
|
| 22 |
graph_config = {
|
| 23 |
"llm": {
|
|
@@ -41,7 +44,7 @@ if st.button("Scrape Courses"):
|
|
| 41 |
try:
|
| 42 |
# Create the SmartScraperGraph instance
|
| 43 |
smart_scraper_graph = SmartScraperMultiGraph(
|
| 44 |
-
prompt=
|
| 45 |
source=urls,
|
| 46 |
config=graph_config
|
| 47 |
)
|
|
|
|
| 18 |
# API Key Input
|
| 19 |
api_key = st.text_input("Enter your API Key:", type="password")
|
| 20 |
|
| 21 |
+
# Prompt Input
|
| 22 |
+
user_prompt = st.text_input("Enter your prompt for scraping:", "tell me about all the courses")
|
| 23 |
+
|
| 24 |
# Scraping Configuration
|
| 25 |
graph_config = {
|
| 26 |
"llm": {
|
|
|
|
| 44 |
try:
|
| 45 |
# Create the SmartScraperGraph instance
|
| 46 |
smart_scraper_graph = SmartScraperMultiGraph(
|
| 47 |
+
prompt=user_prompt, # Use the user-defined prompt
|
| 48 |
source=urls,
|
| 49 |
config=graph_config
|
| 50 |
)
|