yonikremer commited on
Commit
2fd3831
1 Parent(s): 7a75a15

on_form_submit is now cached

Browse files
Files changed (1) hide show
  1. hanlde_form_submit.py +2 -0
hanlde_form_submit.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from grouped_sampling import GroupedSamplingPipeLine
2
 
3
 
@@ -15,6 +16,7 @@ def create_pipeline(model_name: str, group_size) -> GroupedSamplingPipeLine:
15
  )
16
 
17
 
 
18
  def on_form_submit(model_name: str, group_size: int, prompt: str) -> str:
19
  """
20
  Called when the user submits the form.
 
1
+ import streamlit as st
2
  from grouped_sampling import GroupedSamplingPipeLine
3
 
4
 
 
16
  )
17
 
18
 
19
+ @st.cache
20
  def on_form_submit(model_name: str, group_size: int, prompt: str) -> str:
21
  """
22
  Called when the user submits the form.