Spaces:
Runtime error
Runtime error
Download response.py from Arhashmi/scraping_project: direct link, hf CLI and curl.
- Browser
- Download file 471 Bytes
-
https://huggingface.co/spaces/Arhashmi/scraping_project/resolve/main/response.py
- Command line
-
hf download hf://spaces/Arhashmi/scraping_project/response.py
-
curl -L -o response.py https://huggingface.co/spaces/Arhashmi/scraping_project/resolve/main/response.py
471 Bytes
| def get_response(user_input: str, scraped_data: str) -> str: | |
| user_input_lower = user_input.lower() | |
| scraped_data_lower = scraped_data.lower() | |
| print("User Input:", user_input_lower) | |
| print("Scraped Data:", scraped_data_lower) | |
| if "birthplace" in user_input_lower and "imran khan" in scraped_data_lower: | |
| return "Imran Khan was born in Lahore, Pakistan." | |
| else: | |
| return "I'm sorry, I couldn't find an answer based on the provided data." | |