Alic-Li commited on
Commit
5700d75
·
verified ·
1 Parent(s): fab2a53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -64,6 +64,7 @@ def run_rnn(ctx, state):
64
 
65
  def generate_response(message, history, temperature=1.0, top_p=0.3):
66
  global model_tokens, model_state
 
67
 
68
  ctx = ""
69
  for human, assistant in history:
@@ -118,10 +119,6 @@ def chat_with_bot(message, history, temperature, top_p):
118
  with gr.Blocks(title="MiniRWKV_7 34.2M 🪿 2vGPU Space") as demo:
119
  gr.Markdown("# MiniRWKV_7 34.2M 🪿 ")
120
  gr.Markdown("### Only 34.2M Params!!! Use 2V CPU Backend to run this model. ")
121
- @demo.load()
122
- def on_load():
123
- global model_state
124
- model_state = None
125
 
126
  with gr.Row():
127
  with gr.Column(scale=3):
 
64
 
65
  def generate_response(message, history, temperature=1.0, top_p=0.3):
66
  global model_tokens, model_state
67
+ model_state = None
68
 
69
  ctx = ""
70
  for human, assistant in history:
 
119
  with gr.Blocks(title="MiniRWKV_7 34.2M 🪿 2vGPU Space") as demo:
120
  gr.Markdown("# MiniRWKV_7 34.2M 🪿 ")
121
  gr.Markdown("### Only 34.2M Params!!! Use 2V CPU Backend to run this model. ")
 
 
 
 
122
 
123
  with gr.Row():
124
  with gr.Column(scale=3):