ND0210 commited on
Commit
ebf9183
·
verified ·
1 Parent(s): d9417c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
app.py CHANGED
@@ -1,17 +1,12 @@
1
  import gradio as gr
2
  import pandas as pd
3
  import numpy as np
 
4
  from sklearn.naive_bayes import MultinomialNB
5
  from sklearn.feature_extraction.text import TfidfVectorizer
6
 
7
- folder_path = 'https://drive.google.com/drive/u/0/folders/1nGfHZLXL47gh_v5TX1DBeTAFoBASS4FW'
8
-
9
- file_path = folder_path + "/Cleaned Data.xlsx"
10
-
11
- output_path = "data.xlsx" # Đường dẫn và tên file đầu ra
12
- gdown.download(file_path, output_path, quiet=False)
13
-
14
- df = pd.read_excel(output_path)
15
 
16
  X = df['Title']
17
  y = df['Encoded Tag']
 
1
  import gradio as gr
2
  import pandas as pd
3
  import numpy as np
4
+ from datasets import load_dataset
5
  from sklearn.naive_bayes import MultinomialNB
6
  from sklearn.feature_extraction.text import TfidfVectorizer
7
 
8
+ local_csv_dataset = load_dataset("csv", data_files="C:\Users\Tien Dung\Downloads\Cleaned Data.csv", sep=";")
9
+ df = local_csv_dataset["train"]
 
 
 
 
 
 
10
 
11
  X = df['Title']
12
  y = df['Encoded Tag']