File size: 1,599 Bytes
6237b12
f756937
 
6237b12
 
f756937
 
 
 
 
 
 
 
 
 
 
 
 
6237b12
f756937
 
 
 
 
6237b12
f756937
 
 
 
 
 
 
 
 
 
 
 
 
 
6237b12
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import streamlit as st
import requests
import os

def main():
    st.title('Download File from OneDrive')

    download_link = "https://upesstd-my.sharepoint.com/:u:/g/personal/500082340_stu_upes_ac_in/EYwRTq9dcTJHppgydRR-8BMBYY2BehA6jxri5rKehcSZig?e=fjAYDf"
    
    if st.button('Download File'):
        response = requests.get(download_link, allow_redirects=True)
        if response.status_code == 200:
            filename = "downloaded_file.ext" # You can customize the filename
            with open(filename, 'wb') as file:
                file.write(response.content)
            st.success(f"File downloaded successfully and saved as {filename}")
        else:
            st.error(f"Failed to download the file. Status code: {response.status_code}")

if __name__ == '__main__':
    main()
import streamlit as st
import requests
import os

def main():
    st.title('Download File from OneDrive')

    download_link = "https://upesstd-my.sharepoint.com/:u:/g/personal/500082340_stu_upes_ac_in/EYwRTq9dcTJHppgydRR-8BMBYY2BehA6jxri5rKehcSZig?e=fjAYDf"
    
    if st.button('Download File'):
        response = requests.get(download_link, allow_redirects=True)
        if response.status_code == 200:
            filename = "classifer.joblib" # You can customize the filename
            with open(filename, 'wb') as file:
                file.write(response.content)
            st.success(f"File downloaded successfully and saved as {filename}")
        else:
            st.error(f"Failed to download the file. Status code: {response.status_code}")

if __name__ == '__main__':
    main()