ChatBot / Download_log.py
bumk766fall2023's picture
January 18 commit to Hugging Face
92800c4
Raw History Blame Contribute Delete
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()