VIT_Demo / app.py
litav's picture
Update app.py
b08ee34 verified
raw
history blame
647 Bytes
import requests
def check_video_url(video_url):
try:
response = requests.head(video_url) # ืžื‘ืฆืข ื‘ืงืฉืช HEAD ืœื‘ื“ื•ืง ืืช ื”-URL
if response.status_code == 200:
print("The video URL is valid and accessible.")
else:
print(f"Received status code: {response.status_code}. The video may not be accessible.")
except requests.exceptions.RequestException as e:
print(f"An error occurred: {e}")
# ืงื™ืฉื•ืจ ืœืกืจื˜ื•ืŸ ืœื‘ื“ื™ืงื”
video_url = "https://cdn-uploads.huggingface.co/production/uploads/66d6f1b3b50e35e1709bfdf7/x7Ud8PO9QPfmrTvBVcCKE.mp4"
check_video_url(video_url)