Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,6 +78,9 @@ def main():
|
|
| 78 |
if user_input:
|
| 79 |
url = "https://www.sbbusba.edu.pk/" # Example URL
|
| 80 |
web_content = scrape_website(url)
|
|
|
|
|
|
|
|
|
|
| 81 |
relevant_data = search(user_input, [web_content])
|
| 82 |
|
| 83 |
if relevant_data and isinstance(relevant_data[0], str):
|
|
|
|
| 78 |
if user_input:
|
| 79 |
url = "https://www.sbbusba.edu.pk/" # Example URL
|
| 80 |
web_content = scrape_website(url)
|
| 81 |
+
relevant_data = [] # Initialize with a default value
|
| 82 |
+
|
| 83 |
+
if web_content: # Ensure web content is not empty
|
| 84 |
relevant_data = search(user_input, [web_content])
|
| 85 |
|
| 86 |
if relevant_data and isinstance(relevant_data[0], str):
|