OzTianlu commited on
Commit
8b413b1
·
verified ·
1 Parent(s): e51a65b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
- import gradio as gr
 
2
  import torch
3
  from threading import Thread
4
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
@@ -12,7 +13,6 @@ model = AutoModelForCausalLM.from_pretrained(
12
  tie_word_embeddings=False # 尝试强制关闭权重绑定检查
13
  )
14
 
15
- import spaces
16
  @spaces.GPU
17
  def respond(message, history):
18
  messages = [{"role": "system", "content": "You are Spartacus, a helpful assistant."}]
 
1
+
2
+ import spaces
3
  import torch
4
  from threading import Thread
5
  from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
 
13
  tie_word_embeddings=False # 尝试强制关闭权重绑定检查
14
  )
15
 
 
16
  @spaces.GPU
17
  def respond(message, history):
18
  messages = [{"role": "system", "content": "You are Spartacus, a helpful assistant."}]