Gleb Vinarskis commited on
Commit
a77df7c
·
1 Parent(s): 6935b09
Files changed (2) hide show
  1. OCR_score.py +1 -1
  2. floret_language_recognition.py +2 -1
OCR_score.py CHANGED
@@ -4,7 +4,7 @@ class FloretPipeline:
4
  def __init__(self, language=None):
5
  if language == None:
6
  exec(open(hf_hub_download("Maslionok/pipeline1", "test.py")).read())
7
-
8
 
9
 
10
  def __call__(self, text):
 
4
  def __init__(self, language=None):
5
  if language == None:
6
  exec(open(hf_hub_download("Maslionok/pipeline1", "test.py")).read())
7
+ # language =
8
 
9
 
10
  def __call__(self, text):
floret_language_recognition.py CHANGED
@@ -8,7 +8,8 @@ class FloretPipeline:
8
 
9
  def __call__(self, text):
10
  output = self.model.predict(text, k=1)
11
- language, value = output
 
12
 
13
  return language
14
 
 
8
 
9
  def __call__(self, text):
10
  output = self.model.predict(text, k=1)
11
+ language = output[0].replace("__label__", "")
12
+
13
 
14
  return language
15