toandev commited on
Commit
6800630
1 Parent(s): 5e0936b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ from typing import Dict, List
4
 
5
  import gradio as gr
6
 
7
- # import spaces
8
  import torch
9
  from PIL import Image
10
  from transformers import (
@@ -71,7 +71,7 @@ def process_chat_history(history: List) -> tuple[List[Dict], List[Image.Image]]:
71
  return messages, images
72
 
73
 
74
- # @spaces.GPU
75
  def bot_streaming(message: Dict, history: List, max_new_tokens: int = 250):
76
  """
77
  Generate streaming responses for the chatbot.
 
4
 
5
  import gradio as gr
6
 
7
+ import spaces
8
  import torch
9
  from PIL import Image
10
  from transformers import (
 
71
  return messages, images
72
 
73
 
74
+ @spaces.GPU
75
  def bot_streaming(message: Dict, history: List, max_new_tokens: int = 250):
76
  """
77
  Generate streaming responses for the chatbot.