Shuja007 commited on
Commit
46f4682
·
verified ·
1 Parent(s): 9a5c0c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,14 +1,16 @@
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
  import torch
4
- from google_drive_downloader import GoogleDriveDownloader as gdd
 
5
 
6
  # Set the title of the Streamlit app
7
  st.title("Text Classification with Hugging Face Transformers")
8
 
9
  # Function to download the model from Google Drive
10
  def download_model_from_drive(file_id, dest_path):
11
- gdd.download_file_from_google_drive(file_id=file_id, dest_path=dest_path, unzip=False)
 
12
 
13
  # Download the model files
14
  with st.spinner("Downloading model..."):
 
1
  import streamlit as st
2
  from transformers import AutoTokenizer, AutoModelForSequenceClassification
3
  import torch
4
+ import gdown
5
+ import os
6
 
7
  # Set the title of the Streamlit app
8
  st.title("Text Classification with Hugging Face Transformers")
9
 
10
  # Function to download the model from Google Drive
11
  def download_model_from_drive(file_id, dest_path):
12
+ url = f'https://drive.google.com/uc?id={file_id}'
13
+ gdown.download(url, dest_path, quiet=False)
14
 
15
  # Download the model files
16
  with st.spinner("Downloading model..."):