blackwingedkite commited on
Commit
7959bed
·
1 Parent(s): be65c68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -1,5 +1,15 @@
1
- from transformers import AutoModelForMaskedLM, AutoTokenizer
2
  from huggingface_hub import notebook_login
 
 
 
 
 
 
 
 
 
 
 
3
  notebook_login()
4
  checkpoint = "ziqingyang/chinese-alpaca-2-7b"
5
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
@@ -28,4 +38,4 @@ model = AutoModelForMaskedLM.from_pretrained(checkpoint)
28
 
29
 
30
  model.push_to_hub("gutalk_classification")
31
- tokenizer.push_to_hub("gutalk_classification")
 
 
1
  from huggingface_hub import notebook_login
2
+ import torch
3
+ import transformers
4
+ from transformers import AutoModelForMaskedLM, AutoTokenizer
5
+ from transformers import pipeline
6
+ from transformers import LlamaTokenizer, LlamaForCausalLM
7
+ import time
8
+ import csv
9
+ import locale
10
+ locale.getpreferredencoding = lambda: "UTF-8"
11
+
12
+
13
  notebook_login()
14
  checkpoint = "ziqingyang/chinese-alpaca-2-7b"
15
  tokenizer = AutoTokenizer.from_pretrained(checkpoint)
 
38
 
39
 
40
  model.push_to_hub("gutalk_classification")
41
+ tokenizer.push_to_hub("gutalk_classification")