Muhammad Haris commited on
Commit
f9eea17
·
1 Parent(s): c1c415b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -6,8 +6,18 @@ from transformers import GPT2Tokenizer, GPT2LMHeadModel
6
  from sentence_transformers import SentenceTransformer, util
7
  import torch
8
 
9
- # Load medical data
10
- excel_file_path = r"C:\Users\HEHEBOI\Desktop\GPT2Final\medical_data.csv"
 
 
 
 
 
 
 
 
 
 
11
  try:
12
  medical_df = pd.read_csv(excel_file_path, encoding='utf-8')
13
  except UnicodeDecodeError:
 
6
  from sentence_transformers import SentenceTransformer, util
7
  import torch
8
 
9
+ import gdown
10
+ import os
11
+ import pandas as pd
12
+
13
+ # Download the file
14
+ file_id = '1P3Nz6f3KG0m0kO_2pEfnVIhgP8Bvkl4v'
15
+ url = f'https://drive.google.com/uc?id={file_id}'
16
+ excel_file_path = os.path.join(os.path.expanduser("~"), 'medical_data.csv')
17
+
18
+ gdown.download(url, excel_file_path, quiet=False)
19
+
20
+ # Read the CSV file into a DataFrame using 'latin1' encoding
21
  try:
22
  medical_df = pd.read_csv(excel_file_path, encoding='utf-8')
23
  except UnicodeDecodeError: