Lord-Raven commited on
Commit
573c10d
·
1 Parent(s): aef28a9

Messing with fastAPI.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ def classify(data_string, request: gradio.Request):
52
  # else:
53
  start_time = time.time()
54
  result = {}
55
- if (data['cpu']):
56
  result = zero_shot_classification_cpu(data)
57
  else:
58
  result = zero_shot_classification_gpu(data)
 
52
  # else:
53
  start_time = time.time()
54
  result = {}
55
+ if ('cpu' in data):
56
  result = zero_shot_classification_cpu(data)
57
  else:
58
  result = zero_shot_classification_gpu(data)