robinhad commited on
Commit
4d8faf1
·
verified ·
1 Parent(s): d92dc0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  from datetime import datetime
 
4
 
5
  """
6
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
@@ -61,7 +62,7 @@ def respond(
61
  response += token
62
  yield response
63
 
64
-
65
  def ask(instruction: str, context: str = None):
66
  print(datetime.now(), instruction, context)
67
  full_question = ""
 
1
  import gradio as gr
2
  from huggingface_hub import InferenceClient
3
  from datetime import datetime
4
+ import spaces
5
 
6
  """
7
  For more information on `huggingface_hub` Inference API support, please check the docs: https://huggingface.co/docs/huggingface_hub/v0.22.2/en/guides/inference
 
62
  response += token
63
  yield response
64
 
65
+ @spaces.GPU
66
  def ask(instruction: str, context: str = None):
67
  print(datetime.now(), instruction, context)
68
  full_question = ""