Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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):
|