雷娃 commited on
Commit
cb6cb3b
·
1 Parent(s): 9f21eff

modify the layout of input and output

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -47,21 +47,21 @@ def chat(user_input, max_new_tokens=2048):
47
  # Create a custom layout using Blocks
48
  with gr.Blocks() as demo:
49
  gr.Markdown(
50
- "## Ling-lite-1.5 AI助手\n"
51
- "基于 [inclusionAI/Ling-lite-1.5](https://huggingface.co/inclusionAI/Ling-lite-1.5) 的对话式文本生成演示。"
52
  )
53
 
54
  with gr.Row():
55
- max_tokens_slider = gr.Slider(minimum=100, maximum=2048, step=50, label="生成长度")
56
 
57
- output_box = gr.Textbox(lines=10, label="模型回复")
58
-
59
- input_box = gr.Textbox(lines=8, label="输入你的问题")
60
 
61
  examples = gr.Examples(
62
  examples=[
63
- ["介绍大型语言模型的基本概念"],
64
- ["如何解决数学问题中的长上下文依赖?"]
65
  ],
66
  inputs=input_box
67
  )
 
47
  # Create a custom layout using Blocks
48
  with gr.Blocks() as demo:
49
  gr.Markdown(
50
+ "## Ling-lite-1.5 AI Assistant\n"
51
+ "Based on [inclusionAI/Ling-lite-1.5](https://huggingface.co/inclusionAI/Ling-lite-1.5) "
52
  )
53
 
54
  with gr.Row():
55
+ max_tokens_slider = gr.Slider(minimum=100, maximum=2048, step=50, label="Generated length")
56
 
57
+ # output_box = gr.Textbox(lines=10, label="Response")
58
+ output_box = gr.Markdown(label="Response")
59
+ input_box = gr.Textbox(lines=8, label="Input you question")
60
 
61
  examples = gr.Examples(
62
  examples=[
63
+ ["Introducing the basic concepts of large language models"],
64
+ ["How to solve long context dependencies in math problems?"]
65
  ],
66
  inputs=input_box
67
  )