ruv commited on
Commit
264cabb
Β·
verified Β·
1 Parent(s): 63d819a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -114,11 +114,14 @@ def handle_post_success_actions(generated_function):
114
 
115
  def main(initial_prompt, run_mode, num_runs, console_output, command_input):
116
  console_output = "Enter the initial prompt for the development process: " + initial_prompt + "\n"
 
117
 
118
  while True:
119
  console_output += "\nMenu:\n1. Generate and test a function 🎨\n2. Exit πŸ‘‹\n"
 
 
 
120
  yield console_output, gr.update(value="") # Clear the command input
121
- choice = yield console_output, gr.update(interactive=True) # Wait for user input
122
 
123
  if choice == "1":
124
  if run_mode == "1":
@@ -157,6 +160,7 @@ def main(initial_prompt, run_mode, num_runs, console_output, command_input):
157
  console_output += "Invalid choice. Please try again. πŸ˜…\n"
158
  yield console_output, gr.update(interactive=True)
159
 
 
160
  with gr.Blocks() as demo:
161
  gr.Markdown("# LLM-Powered Function Generator")
162
 
 
114
 
115
  def main(initial_prompt, run_mode, num_runs, console_output, command_input):
116
  console_output = "Enter the initial prompt for the development process: " + initial_prompt + "\n"
117
+ yield console_output, gr.update(value="") # Clear the command input
118
 
119
  while True:
120
  console_output += "\nMenu:\n1. Generate and test a function 🎨\n2. Exit πŸ‘‹\n"
121
+ yield console_output, gr.update(interactive=True) # Wait for user input
122
+ choice = command_input
123
+ command_input = ""
124
  yield console_output, gr.update(value="") # Clear the command input
 
125
 
126
  if choice == "1":
127
  if run_mode == "1":
 
160
  console_output += "Invalid choice. Please try again. πŸ˜…\n"
161
  yield console_output, gr.update(interactive=True)
162
 
163
+
164
  with gr.Blocks() as demo:
165
  gr.Markdown("# LLM-Powered Function Generator")
166