spg commited on
Commit
93a003a
1 Parent(s): 1b2bf35

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -8,7 +8,7 @@ MODEL = "gpt-3.5-turbo"
8
  API_URL = os.getenv("API_URL")
9
  DISABLED = os.getenv("DISABLED") == 'True'
10
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
11
- NUM_THREADS = 2
12
 
13
  print (NUM_THREADS)
14
 
@@ -182,10 +182,8 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
182
 
183
  def enable_inputs():
184
  return user_consent_block.update(visible=False), main_block.update(visible=True)
185
-
186
  accept_button.click(None, None, accept_checkbox, _js=js, queue=False)
187
- user_consent_block.update(False)
188
- main_block.update(True)
189
  accept_checkbox.change(fn=enable_inputs, inputs=[], outputs=[user_consent_block, main_block], queue=False)
190
 
191
  inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
 
8
  API_URL = os.getenv("API_URL")
9
  DISABLED = os.getenv("DISABLED") == 'True'
10
  OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
11
+ NUM_THREADS = int(os.getenv("NUM_THREADS"))
12
 
13
  print (NUM_THREADS)
14
 
 
182
 
183
  def enable_inputs():
184
  return user_consent_block.update(visible=False), main_block.update(visible=True)
185
+
186
  accept_button.click(None, None, accept_checkbox, _js=js, queue=False)
 
 
187
  accept_checkbox.change(fn=enable_inputs, inputs=[], outputs=[user_consent_block, main_block], queue=False)
188
 
189
  inputs.submit(reset_textbox, [], [inputs, b1], queue=False)