rycont commited on
Commit
f2de50e
β€’
1 Parent(s): aeb7c06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
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
- text_input = ""
 
 
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)