Akjava commited on
Commit
8ce7d79
·
verified ·
1 Parent(s): f0d8be5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -49,7 +49,7 @@ def init():
49
 
50
  print("initialized")
51
 
52
- @spaces.GPU(duration=120)
53
  def generate_text(messages):
54
  global text_generator
55
  if is_hugging_face:#need everytime initialize for ZeroGPU
@@ -74,7 +74,7 @@ def generate_text(messages):
74
 
75
  def call_generate_text(message, history):
76
  if len(message) == 0:
77
- message.append({"role": "system", "content": "you response around 20 words"})
78
  # history.append({"role": "user", "content": message})
79
  print(message)
80
  print(history)
@@ -94,7 +94,7 @@ with gr.Blocks(title="LLM with TTS") as demo:
94
  gr.Markdown("LLM and TTS models will change without notice.")
95
  js = """
96
  function(chatbot){
97
- console.log(chatbot)
98
  }
99
  """
100
  chatbot = gr.Chatbot(type="messages")
 
49
 
50
  print("initialized")
51
 
52
+ @spaces.GPU
53
  def generate_text(messages):
54
  global text_generator
55
  if is_hugging_face:#need everytime initialize for ZeroGPU
 
74
 
75
  def call_generate_text(message, history):
76
  if len(message) == 0:
77
+ message.append({"role": "system", "content": "you response around 10 words"})
78
  # history.append({"role": "user", "content": message})
79
  print(message)
80
  print(history)
 
94
  gr.Markdown("LLM and TTS models will change without notice.")
95
  js = """
96
  function(chatbot){
97
+ console.log(chatbot[-1])
98
  }
99
  """
100
  chatbot = gr.Chatbot(type="messages")