Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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"))
|