kwanpon commited on
Commit
f29535c
·
verified ·
1 Parent(s): f1a856e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -7
app.py CHANGED
@@ -8,9 +8,7 @@ from transformers import (
8
  TrainingArguments,
9
  Trainer
10
  )
11
- import os
12
 
13
- token = os.getenv('HF_TOKEN')
14
 
15
  # load dataset
16
  df = pd.read_csv("dataset.csv")
@@ -46,11 +44,6 @@ trainer = Trainer(
46
  )
47
  trainer.train()
48
 
49
- from huggingface_hub import HfApi
50
-
51
- model.push_to_hub("kwanpon/mdeberta-classify-thai", use_auth_token=token)
52
- tokenizer.push_to_hub("kwanpon/mdeberta-classify-thai", use_auth_token=token)
53
-
54
  # inference function for gradio
55
  def classify(text):
56
  inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)
 
8
  TrainingArguments,
9
  Trainer
10
  )
 
11
 
 
12
 
13
  # load dataset
14
  df = pd.read_csv("dataset.csv")
 
44
  )
45
  trainer.train()
46
 
 
 
 
 
 
47
  # inference function for gradio
48
  def classify(text):
49
  inputs = tokenizer(text, return_tensors="pt", truncation=True, padding=True)