fb700 commited on
Commit
a9c9153
·
1 Parent(s): f775275

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -2,7 +2,7 @@
2
  # pylint: disable=broad-exception-caught, redefined-outer-name, missing-function-docstring, missing-module-docstring, too-many-arguments, line-too-long, invalid-name, redefined-builtin, redefined-argument-from-local
3
  # import gradio as gr
4
 
5
- # model_name = "models/THUDM/chatglm2-6b-int4"
6
  # gr.load(model_name).lauch()
7
 
8
  # %%writefile demo-4bit.py
@@ -26,7 +26,7 @@ except Exception:
26
  logger.warning("Windows, cant run time.tzset()")
27
 
28
  # model_name = "THUDM/chatglm2-6b" # 7x?G
29
- model_name = "THUDM/chatglm2-6b-int4" # 3.9G
30
 
31
  RETRY_FLAG = False
32
 
@@ -134,7 +134,7 @@ def predict(
134
  yield chatbot, history, past_key_values
135
 
136
 
137
- def trans_api(input, max_length=4096, top_p=0.8, temperature=0.2):
138
  if max_length < 10:
139
  max_length = 4096
140
  if top_p < 0.1 or top_p > 1:
 
2
  # pylint: disable=broad-exception-caught, redefined-outer-name, missing-function-docstring, missing-module-docstring, too-many-arguments, line-too-long, invalid-name, redefined-builtin, redefined-argument-from-local
3
  # import gradio as gr
4
 
5
+ # model_name = "fb700/chatglm-fitness-RLHF"
6
  # gr.load(model_name).lauch()
7
 
8
  # %%writefile demo-4bit.py
 
26
  logger.warning("Windows, cant run time.tzset()")
27
 
28
  # model_name = "THUDM/chatglm2-6b" # 7x?G
29
+ model_name = "fb700/chatglm-fitness-RLHF" # 3.9G
30
 
31
  RETRY_FLAG = False
32
 
 
134
  yield chatbot, history, past_key_values
135
 
136
 
137
+ def trans_api(input, max_length=40960, top_p=0.8, temperature=0.2):
138
  if max_length < 10:
139
  max_length = 4096
140
  if top_p < 0.1 or top_p > 1: