kevinwang676 commited on
Commit
2cf187d
·
1 Parent(s): 056a2f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -5,7 +5,7 @@ import torch
5
  import os
6
 
7
 
8
- CHECKPOINT_PATH=f'output_lh_v2/checkpoint-700'
9
  tokenizer = AutoTokenizer.from_pretrained("chatglm3-6b", trust_remote_code=True)
10
  config = AutoConfig.from_pretrained("chatglm3-6b", trust_remote_code=True, pre_seq_len=128)
11
  model = AutoModel.from_pretrained("chatglm3-6b", config=config, trust_remote_code=True)
@@ -97,13 +97,8 @@ def reset_state():
97
  return [], [], None
98
 
99
 
100
- response, history = model.chat(tokenizer, "你是谁", history=[])
101
- response, history = model.chat(tokenizer, "你好呀", history=history)
102
- response, history = model.chat(tokenizer, "早上好", history=history)
103
-
104
-
105
  with gr.Blocks() as demo:
106
- gr.HTML("""<h1 align="center">ChatGLM2-6B</h1>""")
107
 
108
  chatbot = gr.Chatbot()
109
  with gr.Row():
 
5
  import os
6
 
7
 
8
+ CHECKPOINT_PATH=f'linghua_pt-20231202-155337-128-1e-2/checkpoint-400'
9
  tokenizer = AutoTokenizer.from_pretrained("chatglm3-6b", trust_remote_code=True)
10
  config = AutoConfig.from_pretrained("chatglm3-6b", trust_remote_code=True, pre_seq_len=128)
11
  model = AutoModel.from_pretrained("chatglm3-6b", config=config, trust_remote_code=True)
 
97
  return [], [], None
98
 
99
 
 
 
 
 
 
100
  with gr.Blocks() as demo:
101
+ gr.HTML("""<h1 align="center">ChatGLM3-6B</h1>""")
102
 
103
  chatbot = gr.Chatbot()
104
  with gr.Row():