Spaces:
Sleeping
Sleeping
Muhammad Haris
commited on
Commit
·
f9eea17
1
Parent(s):
c1c415b
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,18 @@ from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
|
6 |
from sentence_transformers import SentenceTransformer, util
|
7 |
import torch
|
8 |
|
9 |
-
|
10 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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:
|