Lord-Raven commited on
Commit
f6fc14b
·
1 Parent(s): cea7120

Experimenting with few-shot classification.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -62,7 +62,7 @@ def classify(data_string, request: gradio.Request):
62
  if request.headers["origin"] not in ["https://statosphere-3704059fdd7e.c5v4v4jx6pq5.win", "https://crunchatize-77a78ffcc6a6.c5v4v4jx6pq5.win", "https://ravenok-statosphere-backend.hf.space"]:
63
  return "{}"
64
  data = json.loads(data_string)
65
- if data['task'] == 'few_shot_classification':
66
  return few_shot_classification
67
  else:
68
  return zero_shot_classification
 
62
  if request.headers["origin"] not in ["https://statosphere-3704059fdd7e.c5v4v4jx6pq5.win", "https://crunchatize-77a78ffcc6a6.c5v4v4jx6pq5.win", "https://ravenok-statosphere-backend.hf.space"]:
63
  return "{}"
64
  data = json.loads(data_string)
65
+ if 'task' in data and data['task'] == 'few_shot_classification':
66
  return few_shot_classification
67
  else:
68
  return zero_shot_classification