PierreBrunelle commited on
Commit
f1de868
Β·
verified Β·
1 Parent(s): 62421f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -6
app.py CHANGED
@@ -267,7 +267,7 @@ def gradio_interface():
267
  large_keywords = gr.Textbox(label="Mistral-Medium Keywords")
268
  open_keywords = gr.Textbox(label="Open-Mistral-Nemo Keywords")
269
 
270
- with gr.TabItem("πŸ“Š History & Analysis", id=1):
271
  with gr.Tabs():
272
  with gr.TabItem("Prompt History"):
273
  history = gr.DataFrame(
@@ -297,6 +297,21 @@ def gradio_interface():
297
  wrap=True,
298
  elem_classes="table-style"
299
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
300
 
301
  # Footer with links and additional info
302
  gr.HTML("""
@@ -346,16 +361,23 @@ def gradio_interface():
346
  </style>
347
  """)
348
 
349
- # Setup event handlers
350
  submit_btn.click(
351
  run_inference_and_analysis,
352
- inputs=[task, system_prompt, input_text, temperature, top_p, max_tokens, stop, random_seed, safe_prompt],
353
- outputs=[omn_response, ml_response, large_sentiment, open_sentiment, large_keywords, open_keywords,
354
- large_readability, open_readability, history, responses, analysis, params]
 
 
 
 
 
 
 
 
 
355
  )
356
 
357
  return demo
358
 
359
- # Launch the Gradio interface
360
  if __name__ == "__main__":
361
  gradio_interface().launch()
 
267
  large_keywords = gr.Textbox(label="Mistral-Medium Keywords")
268
  open_keywords = gr.Textbox(label="Open-Mistral-Nemo Keywords")
269
 
270
+ with gr.TabItem("πŸ“Š History & Analysis", id=1):
271
  with gr.Tabs():
272
  with gr.TabItem("Prompt History"):
273
  history = gr.DataFrame(
 
297
  wrap=True,
298
  elem_classes="table-style"
299
  )
300
+
301
+ with gr.TabItem("Model Parameters"):
302
+ params = gr.DataFrame(
303
+ headers=[
304
+ "Timestamp",
305
+ "Temperature",
306
+ "Top P",
307
+ "Max Tokens",
308
+ "Stop Sequences",
309
+ "Random Seed",
310
+ "Safe Prompt"
311
+ ],
312
+ wrap=True,
313
+ elem_classes="table-style"
314
+ )
315
 
316
  # Footer with links and additional info
317
  gr.HTML("""
 
361
  </style>
362
  """)
363
 
 
364
  submit_btn.click(
365
  run_inference_and_analysis,
366
+ inputs=[
367
+ task, system_prompt, input_text,
368
+ temperature, top_p, max_tokens,
369
+ stop, random_seed, safe_prompt
370
+ ],
371
+ outputs=[
372
+ omn_response, ml_response,
373
+ large_sentiment, open_sentiment,
374
+ large_keywords, open_keywords,
375
+ large_readability, open_readability,
376
+ history, responses, analysis, params # Added params here
377
+ ]
378
  )
379
 
380
  return demo
381
 
 
382
  if __name__ == "__main__":
383
  gradio_interface().launch()