EkhiAzur commited on
Commit
3c02d56
1 Parent(s): 5e8c0ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -16,7 +16,9 @@ tokenizer = AutoTokenizer.from_pretrained(
16
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, max_length=512,
17
  padding=True, truncation=True, batch_size=1)
18
 
19
- def prozesatu(Testua):
 
 
20
  prediction = prozesatu.classifier(Testua)[0]
21
  if prediction["label"]=="GAI":
22
  return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}
 
16
  classifier = pipeline("text-classification", tokenizer=tokenizer, model=model, max_length=512,
17
  padding=True, truncation=True, batch_size=1)
18
 
19
+ def prozesatu(Testua, request: gr.Request):
20
+ print(request.headers["Accept-Language"])
21
+ return request.headers["Accept-Language"]
22
  prediction = prozesatu.classifier(Testua)[0]
23
  if prediction["label"]=="GAI":
24
  return {"Gai":prediction["score"], "Ez gai": 1-prediction["score"]}