Lord-Raven commited on
Commit
175b771
·
1 Parent(s): cd2d5ed

Blocking requests from other origins.

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ classifier = pipeline(task="zero-shot-classification", model=model, tokenizer=to
32
  def zero_shot_classification(data_string, request: gradio.Request):
33
  if request:
34
  print("Request headers dictionary:", request.headers)
35
- if request.origin not in ["https://jhuhman-statosphere-backend.hf.space"]
36
  return ""
37
  print(data_string)
38
  data = json.loads(data_string)
 
32
  def zero_shot_classification(data_string, request: gradio.Request):
33
  if request:
34
  print("Request headers dictionary:", request.headers)
35
+ if request.origin not in ["https://jhuhman-statosphere-backend.hf.space"]:
36
  return ""
37
  print(data_string)
38
  data = json.loads(data_string)