Update app.py
Browse files
app.py
CHANGED
|
@@ -11,10 +11,12 @@ def loadModels():
|
|
| 11 |
print("Loaded :)")
|
| 12 |
return _model, _tokenizer
|
| 13 |
|
| 14 |
-
lit.title("
|
| 15 |
-
lit.caption("
|
| 16 |
lit.caption("https://main-biblify-space-rycont.endpoint.ainize.ai/")
|
| 17 |
|
|
|
|
|
|
|
| 18 |
MAX_LENGTH = 128
|
| 19 |
|
| 20 |
def biblifyWithBeams(beam, tokens, attention_mask):
|
|
@@ -31,7 +33,9 @@ def biblifyWithBeams(beam, tokens, attention_mask):
|
|
| 31 |
generated,
|
| 32 |
).replace('<s>', '').replace('</s>', '')
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
|
| 36 |
if len(text_input.strip()) > 0:
|
| 37 |
print(text_input)
|
|
|
|
| 11 |
print("Loaded :)")
|
| 12 |
return _model, _tokenizer
|
| 13 |
|
| 14 |
+
lit.title("μ±κ²½λ§ν¬ μμ±κΈ°")
|
| 15 |
+
lit.caption("ν λ¬Έμ₯μ κ°μ₯ μ λ³νν©λλ€. μ λλ‘ λμνμ§ μλ€λ©΄ μλ λ§ν¬λ‘ μ΄λν΄μ£ΌμΈμ")
|
| 16 |
lit.caption("https://main-biblify-space-rycont.endpoint.ainize.ai/")
|
| 17 |
|
| 18 |
+
loadModels()
|
| 19 |
+
|
| 20 |
MAX_LENGTH = 128
|
| 21 |
|
| 22 |
def biblifyWithBeams(beam, tokens, attention_mask):
|
|
|
|
| 33 |
generated,
|
| 34 |
).replace('<s>', '').replace('</s>', '')
|
| 35 |
|
| 36 |
+
with lit.form("gen")
|
| 37 |
+
text_input = lit.text_input("λ¬Έμ₯ μ
λ ₯")
|
| 38 |
+
submitted = lit.form_submit_button("μμ±")
|
| 39 |
|
| 40 |
if len(text_input.strip()) > 0:
|
| 41 |
print(text_input)
|