dimasdeffieux commited on
Commit
5764a9a
Β·
verified Β·
1 Parent(s): 2000233

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -7,6 +7,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
7
  import torch
8
 
9
  img = "input_data/ocr_input/japan1.jpg"
 
10
 
11
  model_id = "deepseek-ai/deepseek-llm-7b-chat"
12
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
@@ -39,3 +40,5 @@ def ocr_inference(img, lang):
39
 
40
  def make_flashcards(words):
41
  pass;
 
 
 
7
  import torch
8
 
9
  img = "input_data/ocr_input/japan1.jpg"
10
+ text = "ν‘œν˜„μ΄ μ„œνˆ° 것도 잘λͺ»μΈκ°€μš”. λ‚˜ μ°¨κ°€μš΄ λ„μ‹œμ— λ”°λœ»ν•œ μ—¬μž”λ°. κ·Έλƒ₯ μ’‹μ•„ν•œλ‹¨ 말도 μ•ˆ λ˜λŠ”κ°€μš”. μ†”μ§ν•˜κ²Œ λ‚œ λ§ν•˜κ³  μ‹Άμ–΄μš”"
11
 
12
  model_id = "deepseek-ai/deepseek-llm-7b-chat"
13
  tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
 
40
 
41
  def make_flashcards(words):
42
  pass;
43
+
44
+ print(text_inference(text, "korean"))