gaochangkuan commited on
Commit
3445255
1 Parent(s): 6b4f6a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import os
2
  import torch
 
3
  import gradio as gr
4
  from transformers import GemmaTokenizer, AutoModelForCausalLM
5
  from transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer, TextIteratorStreamer
@@ -74,6 +75,7 @@ tokenizer.chat_template = """{% for message in messages %}
74
  {% endif %}
75
  {% endfor %}""".replace("\n", "").replace(" ", "")
76
 
 
77
  def chat_zhuji(
78
  message: str,
79
  history: list,
 
1
  import os
2
  import torch
3
+ import spaces
4
  import gradio as gr
5
  from transformers import GemmaTokenizer, AutoModelForCausalLM
6
  from transformers import AutoModelForCausalLM, AutoConfig, AutoTokenizer, TextIteratorStreamer
 
75
  {% endif %}
76
  {% endfor %}""".replace("\n", "").replace(" ", "")
77
 
78
+ @spaces.GPU(duration=500)
79
  def chat_zhuji(
80
  message: str,
81
  history: list,