grahamwhiteuk commited on
Commit
b8d64ca
·
1 Parent(s): eb379b7

fix: align descriptive text to the Figma design

Browse files

Signed-off-by: Graham White <[email protected]>

Files changed (2) hide show
  1. src/app.css +1 -1
  2. src/app.py +10 -6
src/app.css CHANGED
@@ -4,7 +4,7 @@ footer {
4
  .gr_docs_link {
5
  float: right;
6
  font-size: var(--text-xs);
7
- margin-top: -8px;
8
  }
9
  .gr_title {
10
  display: flex;
 
4
  .gr_docs_link {
5
  float: right;
6
  font-size: var(--text-xs);
7
+ margin-top: 2px;
8
  }
9
  .gr_title {
10
  display: flex;
src/app.py CHANGED
@@ -18,8 +18,16 @@ SYS_PROMPT = f"""Knowledge Cutoff Date: April 2024.
18
  Today's Date: {today_date}.
19
  You are Granite, developed by IBM. You are a helpful AI assistant"""
20
  TITLE = "IBM Granite 3.1 8b Instruct"
21
- DESCRIPTION = "Try one of the sample prompts below or write your own. Remember, just like developers, \
22
- AI models can make mistakes."
 
 
 
 
 
 
 
 
23
  MAX_INPUT_TOKEN_LENGTH = 128_000
24
  MAX_NEW_TOKENS = 1024
25
  TEMPERATURE = 0.7
@@ -90,10 +98,6 @@ with gr.Blocks(
90
  elem_classes=["gr_title"],
91
  )
92
  gr.HTML(DESCRIPTION)
93
- gr.HTML(
94
- value='<a href="https://www.ibm.com/granite/docs/">View Documentation</a> <i class="fa fa-external-link"></i>',
95
- elem_classes=["gr_docs_link"],
96
- )
97
  chat_interface = gr.ChatInterface(
98
  fn=generate,
99
  examples=[
 
18
  Today's Date: {today_date}.
19
  You are Granite, developed by IBM. You are a helpful AI assistant"""
20
  TITLE = "IBM Granite 3.1 8b Instruct"
21
+ DESCRIPTION = """
22
+ <p>Granite 3.1 is a general purpose large language model released in the open under an Apache 2.0 license. Granite
23
+ models support a 128k context length.</p>
24
+
25
+ <p>Try one of the sample prompts below or write your own. Remember, AI models can make mistakes.
26
+ <span class="gr_docs_link">
27
+ <a href="https://www.ibm.com/granite/docs/">View Documentation</a> <i class="fa fa-external-link"></i>
28
+ </span>
29
+ </p>
30
+ """
31
  MAX_INPUT_TOKEN_LENGTH = 128_000
32
  MAX_NEW_TOKENS = 1024
33
  TEMPERATURE = 0.7
 
98
  elem_classes=["gr_title"],
99
  )
100
  gr.HTML(DESCRIPTION)
 
 
 
 
101
  chat_interface = gr.ChatInterface(
102
  fn=generate,
103
  examples=[