awacke1 commited on
Commit
abfbe18
·
1 Parent(s): 324ee34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -11
app.py CHANGED
@@ -46,20 +46,15 @@ def generate_prompt(prompt):
46
  # Return the generated prompt and solution
47
  return output_text, solution
48
 
49
- # Define the streamlit app
50
- def app():
51
- # Set the app title
52
- st.title('ICL-LM Interface')
53
- # Get the user input
54
- option = st.selectbox('Select a problem:', list(prompts.keys()))
55
  # Generate the prompt and solution
56
  prompt, solution = generate_prompt(option)
57
  # Display the prompt
58
  st.write('Prompt:', prompt)
59
  # Display the solution
60
  st.write('Solution:', solution)
61
-
62
- # Run the streamlit app
63
- if __name__ == '__main__':
64
- while True:
65
- app()
 
46
  # Return the generated prompt and solution
47
  return output_text, solution
48
 
49
+ # Set the app title
50
+ st.title('ICL-LM Interface')
51
+ # Get the user input
52
+ option = st.selectbox('Select a problem:', list(prompts.keys()))
53
+
54
+ if st.button('Generate Prompt and Solution'):
55
  # Generate the prompt and solution
56
  prompt, solution = generate_prompt(option)
57
  # Display the prompt
58
  st.write('Prompt:', prompt)
59
  # Display the solution
60
  st.write('Solution:', solution)