Ahsen Khaliq commited on
Commit
9d054ad
Β·
1 Parent(s): 0ba1651

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -14,8 +14,10 @@ model = AutoModelForCausalLM.from_pretrained(
14
  ).to(device='cpu', non_blocking=True)
15
  _ = model.eval()
16
 
17
-
18
-
 
 
19
  def greet(text):
20
  prompt = text
21
  with torch.no_grad():
@@ -25,5 +27,5 @@ def greet(text):
25
 
26
  return generated
27
 
28
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
29
  iface.launch()
 
14
  ).to(device='cpu', non_blocking=True)
15
  _ = model.eval()
16
 
17
+ title = "KoGPT"
18
+ description = "Gradio demo for KoGPT(Korean Generative Pre-trained Transformer). To use it, simply add your text, or click one of the examples to load them. Read more at the links below."
19
+ article = "<p style='text-align: center'><a href='https://github.com/kakaobrain/kogpt'>KoGPT: KakaoBrain Korean(hangul) Generative Pre-trained Transformer</a> | <a href='https://huggingface.co/kakaobrain/kogpt'>Huggingface Model</a></p>"
20
+ examples=[['μΈκ°„μ²˜λŸΌ μƒκ°ν•˜κ³ , ν–‰λ™ν•˜λŠ” \'지λŠ₯\'을 톡해 인λ₯˜κ°€ μ΄μ œκΉŒμ§€ 풀지 λͺ»ν–ˆλ˜']]
21
  def greet(text):
22
  prompt = text
23
  with torch.no_grad():
 
27
 
28
  return generated
29
 
30
+ iface = gr.Interface(fn=greet, inputs="text", outputs="text", title=title, description=description, article=article, examples=examples)
31
  iface.launch()