Etash Guha commited on
Commit
0f38260
1 Parent(s): ecf217a
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -37,7 +37,6 @@ parameters_section = sidebar.expander("Parameters", expanded=False)
37
  tree_width = parameters_section.number_input("Tree Width", min_value=1, max_value=5, value=1)
38
  tree_depth = parameters_section.number_input("Tree Depth", min_value=1, max_value=8, value=3)
39
  iterations = parameters_section.number_input("Iterations", min_value=1, max_value=4, value=2)
40
- key = st.sidebar.text_input("Enter your OpenAI Api Key:", type="password")
41
  sidebar.markdown('<hr style="margin-top: 0.5rem; margin-bottom: 0.5rem;">', unsafe_allow_html=True)
42
 
43
  with sidebar:
@@ -51,7 +50,6 @@ def make_args(instruction, tree_depth, tree_width, iterations):
51
 
52
  parser.add_argument("--strategy", default="mcts", help="Strategy to use")
53
  parser.add_argument("--language", default="py", help="Programming language")
54
- parser.add_argument("--model", default="samba", help="Model type")
55
  parser.add_argument("--max_iters", default=iterations, help="Maximum iterations")
56
  parser.add_argument("--instruction", default=instruction, help="Instruction text")
57
  parser.add_argument("--verbose", action="store_true", help="Verbose output")
@@ -66,7 +64,6 @@ def make_args(instruction, tree_depth, tree_width, iterations):
66
 
67
  def run_querry():
68
  if user_input:
69
-
70
  # Create a new container for each subsequent message
71
  runtime_container.write("Initiating process...")
72
 
@@ -78,6 +75,7 @@ def run_querry():
78
 
79
  with st.spinner('Running...'):
80
  args = make_args(user_input, tree_depth, tree_width, iterations)
 
81
  # main call
82
  response = lats_main(args)
83
 
@@ -101,6 +99,5 @@ with chat_col:
101
  fail = True
102
 
103
  if (not fail):
104
- openai.api_key = key
105
  run_querry()
106
 
 
37
  tree_width = parameters_section.number_input("Tree Width", min_value=1, max_value=5, value=1)
38
  tree_depth = parameters_section.number_input("Tree Depth", min_value=1, max_value=8, value=3)
39
  iterations = parameters_section.number_input("Iterations", min_value=1, max_value=4, value=2)
 
40
  sidebar.markdown('<hr style="margin-top: 0.5rem; margin-bottom: 0.5rem;">', unsafe_allow_html=True)
41
 
42
  with sidebar:
 
50
 
51
  parser.add_argument("--strategy", default="mcts", help="Strategy to use")
52
  parser.add_argument("--language", default="py", help="Programming language")
 
53
  parser.add_argument("--max_iters", default=iterations, help="Maximum iterations")
54
  parser.add_argument("--instruction", default=instruction, help="Instruction text")
55
  parser.add_argument("--verbose", action="store_true", help="Verbose output")
 
64
 
65
  def run_querry():
66
  if user_input:
 
67
  # Create a new container for each subsequent message
68
  runtime_container.write("Initiating process...")
69
 
 
75
 
76
  with st.spinner('Running...'):
77
  args = make_args(user_input, tree_depth, tree_width, iterations)
78
+ setattr(args, 'model', 'samba')
79
  # main call
80
  response = lats_main(args)
81
 
 
99
  fail = True
100
 
101
  if (not fail):
 
102
  run_querry()
103