belyakoff commited on
Commit
f1c1728
·
verified ·
1 Parent(s): d50480b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,10 +1,11 @@
1
  import os
2
-
3
  import gradio as gr
4
  from transformers import pipeline
5
 
6
  classifier = pipeline("zero-shot-classification", model=os.getenv('MODEL'))
7
 
 
8
  def classify(text, labels):
9
  labels = labels.split(',')
10
  if not text or not labels:
 
1
  import os
2
+ import spaces
3
  import gradio as gr
4
  from transformers import pipeline
5
 
6
  classifier = pipeline("zero-shot-classification", model=os.getenv('MODEL'))
7
 
8
+ @spaces.GPU(duration=120)
9
  def classify(text, labels):
10
  labels = labels.split(',')
11
  if not text or not labels: