Spaces:
Runtime error
Runtime error
Download Download_log.py from bumk766fall2023/ChatBot: direct link, hf CLI and curl.
- Browser
- Download file 446 Bytes
-
https://huggingface.co/spaces/bumk766fall2023/ChatBot/resolve/main/Download_log.py
- Command line
-
hf download hf://spaces/bumk766fall2023/ChatBot/Download_log.py
-
curl -L -o Download_log.py https://huggingface.co/spaces/bumk766fall2023/ChatBot/resolve/main/Download_log.py
446 Bytes
| import requests | |
| import time | |
| def download_log_file(): | |
| url = "https://bumk766fall2023-chatbot.hf.space/log_file" | |
| response = requests.get(url) | |
| if response.status_code == 200: | |
| with open("downloaded_log_data.txt", "w") as file: | |
| file.write(response.text) | |
| print("Log file downloaded successfully.") | |
| else: | |
| print(f"Failed to download log file. Status code: {response.status_code}") | |
| download_log_file() |