Spaces:
Running
on
Zero
Running
on
Zero
Lord-Raven
commited on
Commit
·
f6fc14b
1
Parent(s):
cea7120
Experimenting with few-shot classification.
Browse files
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
|