jackycedar commited on
Commit
fcd9b4e
·
1 Parent(s): 8831db7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -503,27 +503,27 @@ with gr.Blocks() as demo:
503
  #repetition_penalty = gr.Slider( minimum=0.1, maximum=3.0, value=1.03, step=0.01, interactive=True, label="Repetition Penalty", )
504
  chat_counter = gr.Number(value=0, visible=True, precision=0)
505
 
506
- with gr.Column(elem_id = "user_consent_container") as user_consent_block:
507
- # Get user consent
508
- with gr.Accordion("User Consent for Data Collection, Use, and Sharing", open=True):
509
- gr.HTML("""
510
- <div>
511
- <p>By using our app, which is powered by OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:</p>
512
- <ol>
513
- <li><strong>Collection:</strong> We may collect information, including the inputs you type into our app and the outputs generated by OpenAI's API.</li>
514
- <li><strong>Use:</strong> We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications.</li>
515
- <li><strong>Sharing and Publication:</strong> Your data may be published, shared with third parties, or used for analysis and reporting purposes.</li>
516
- <li><strong>Data Retention:</strong> We may retain your data for as long as necessary.</li>
517
- </ol>
518
- <p>By continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.</p>
519
- </div>
520
- """)
521
- accept_button = gr.Button("I Agree")
522
 
523
- def enable_inputs():
524
- return user_consent_block.update(visible=False), main_block.update(visible=True)
525
 
526
- accept_button.click(fn=enable_inputs, inputs=[], outputs=[user_consent_block, main_block], queue=False)
527
 
528
  inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
529
  inputs.submit(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key
@@ -534,5 +534,5 @@ with gr.Blocks() as demo:
534
 
535
 
536
 
537
- # if __name__ == "__main__":
538
- # demo.launch(debug = True)
 
503
  #repetition_penalty = gr.Slider( minimum=0.1, maximum=3.0, value=1.03, step=0.01, interactive=True, label="Repetition Penalty", )
504
  chat_counter = gr.Number(value=0, visible=True, precision=0)
505
 
506
+ # with gr.Column(elem_id = "user_consent_container", , visible=False) as user_consent_block:
507
+ # # Get user consent
508
+ # with gr.Accordion("User Consent for Data Collection, Use, and Sharing", open=True):
509
+ # gr.HTML("""
510
+ # <div>
511
+ # <p>By using our app, which is powered by OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:</p>
512
+ # <ol>
513
+ # <li><strong>Collection:</strong> We may collect information, including the inputs you type into our app and the outputs generated by OpenAI's API.</li>
514
+ # <li><strong>Use:</strong> We may use the collected data for research purposes, to improve our services, and to develop new products or services, including commercial applications.</li>
515
+ # <li><strong>Sharing and Publication:</strong> Your data may be published, shared with third parties, or used for analysis and reporting purposes.</li>
516
+ # <li><strong>Data Retention:</strong> We may retain your data for as long as necessary.</li>
517
+ # </ol>
518
+ # <p>By continuing to use our app, you provide your explicit consent to the collection, use, and potential sharing of your data as described above. If you do not agree with our data collection, use, and sharing practices, please do not use our app.</p>
519
+ # </div>
520
+ # """)
521
+ # accept_button = gr.Button("I Agree")
522
 
523
+ # def enable_inputs():
524
+ # return user_consent_block.update(visible=False), main_block.update(visible=True)
525
 
526
+ # accept_button.click(fn=enable_inputs, inputs=[], outputs=[user_consent_block, main_block], queue=False)
527
 
528
  inputs.submit(reset_textbox, [], [inputs, b1], queue=False)
529
  inputs.submit(predict, [inputs, top_p, temperature, chat_counter, chatbot, state], [chatbot, state, chat_counter, server_status_code, inputs, b1],) #openai_api_key
 
534
 
535
 
536
 
537
+ if __name__ == "__main__":
538
+ demo.launch(debug = True)