dar-tau commited on
Commit
c000f02
·
verified ·
1 Parent(s): 5e8b4c1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -114,10 +114,19 @@ css = '''
114
  border: 2px solid #000;
115
  border-radius: 10px;
116
  padding: 10px;
 
117
  margin-left: 5%;
118
  width: 90%;
 
 
 
119
  background: pink;
120
  }
 
 
 
 
 
121
  .bubble textarea {
122
  border: none;
123
  box-shadow: none;
@@ -185,6 +194,9 @@ with gr.Blocks(theme=gr.themes.Default(), css=css) as demo:
185
  # btn.click(reset_new_model, [global_state])
186
 
187
  with gr.Blocks():
 
 
 
188
  with gr.Tab('Memory Recall'):
189
  pass
190
  with gr.Tab('Physics Understanding'):
@@ -223,7 +235,8 @@ with gr.Blocks(theme=gr.themes.Default(), css=css) as demo:
223
  top_p = gr.Slider(0., 1., value=0.95, label='top p')
224
 
225
  with gr.Group('Output'):
226
- interpretation_bubbles = [gr.Textbox('', container=False, visible=False, elem_classes=['bubble'])
 
227
  for i in range(model.config.num_hidden_layers)]
228
 
229
  for i, btn in enumerate(tokens_container):
 
114
  border: 2px solid #000;
115
  border-radius: 10px;
116
  padding: 10px;
117
+ margin-top: 15px;
118
  margin-left: 5%;
119
  width: 90%;
120
+ }
121
+
122
+ .even_bubble{
123
  background: pink;
124
  }
125
+
126
+ .odd_bubble{
127
+ background: navy;
128
+ }
129
+
130
  .bubble textarea {
131
  border: none;
132
  box-shadow: none;
 
194
  # btn.click(reset_new_model, [global_state])
195
 
196
  with gr.Blocks():
197
+ gr.Markdwon('''
198
+ Here are some examples of prompts we can analyze their internal representations
199
+ ''')
200
  with gr.Tab('Memory Recall'):
201
  pass
202
  with gr.Tab('Physics Understanding'):
 
235
  top_p = gr.Slider(0., 1., value=0.95, label='top p')
236
 
237
  with gr.Group('Output'):
238
+ interpretation_bubbles = [gr.Textbox('', container=False, visible=False, elem_classes=['bubble',
239
+ 'even_bubble' if i % 2 == 0 else 'odd_bubble'])
240
  for i in range(model.config.num_hidden_layers)]
241
 
242
  for i, btn in enumerate(tokens_container):