Download app.py from Geek7/Dl4: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/Geek7/Dl4/resolve/main/app.py
- Command line
-
hf download hf://spaces/Geek7/Dl4/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Geek7/Dl4/resolve/main/app.py
737 Bytes
| import streamlit as st | |
| import instaloader | |
| def download_instagram_profile(username): | |
| try: | |
| instaloader.Instaloader().download_profile(username, profile_pic_only=False) | |
| st.success(f"Profile downloaded successfully for {username}!") | |
| except Exception as e: | |
| st.error(f"Error: {str(e)}") | |
| def main(): | |
| st.title("Instagram Profile Downloader") | |
| # Input field for Instagram username | |
| username = st.text_input("Enter Instagram Username:") | |
| # Button to trigger the download | |
| if st.button("Download Profile"): | |
| if username: | |
| download_instagram_profile(username) | |
| else: | |
| st.warning("Please enter a valid Instagram username.") | |
| if __name__ == "__main__": | |
| main() |