Quardo commited on
Commit
a48c771
1 Parent(s): 9451027

Updated space

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -578,14 +578,14 @@ demo = gr.ChatInterface(
578
  gr.Checkbox(label="FakeTool [Search engine beta (Warning; each query takes up to 30 seconds)]", value=True),
579
  gr.Checkbox(label="Better system prompt (ignores the system prompt set by user.)", value=True),
580
  ],
581
- head="""<script>if(!confirm("By using our application, which integrates with OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:\\n\\n1. Data Collection: This application may log the following data through the Gradio endpoint or the API endpoint: message requests (including messages, responses, model settings, and images sent along with the messages), images that were generated (including only the prompt and the image), search tool calls (including query, search results, summaries, and output responses), and moderation checks (including input and output).\\n2. Data Retention and Removal: Data is retained until further notice or until a specific request for removal is made.\\n3. Data Usage: The collected data may be used for various purposes, including but not limited to, administrative review of logs, AI training, and publication as a dataset.\\n4. Privacy: Please avoid sharing any personal information.\\n\\nBy continuing to use our application, you explicitly consent to the collection, use, and potential sharing of your data as described above. If you disagree with our data collection, usage, and sharing practices, we advise you not to use our application."))close();</script>"""
582
  )
583
 
584
  app = FastAPI()
585
 
586
- @app.get("/chat/confirm.js")
587
- def html():
588
- return FileResponse("confirm.js")
589
 
590
  @app.get("/api/v1/docs")
591
  def html():
 
578
  gr.Checkbox(label="FakeTool [Search engine beta (Warning; each query takes up to 30 seconds)]", value=True),
579
  gr.Checkbox(label="Better system prompt (ignores the system prompt set by user.)", value=True),
580
  ],
581
+ head="""<script>if(!confirm("By using our application, which integrates with OpenAI's API, you acknowledge and agree to the following terms regarding the data you provide:\\n\\n1. Data Collection: This application may log the following data through the Gradio endpoint or the API endpoint: message requests (including messages, responses, model settings, and images sent along with the messages), images that were generated (including only the prompt and the image), search tool calls (including query, search results, summaries, and output responses), and moderation checks (including input and output).\\n2. Data Retention and Removal: Data is retained until further notice or until a specific request for removal is made.\\n3. Data Usage: The collected data may be used for various purposes, including but not limited to, administrative review of logs, AI training, and publication as a dataset.\\n4. Privacy: Please avoid sharing any personal information.\\n\\nBy continuing to use our application, you explicitly consent to the collection, use, and potential sharing of your data as described above. If you disagree with our data collection, usage, and sharing practices, we advise you not to use our application."))location.href="/declined";</script>"""
582
  )
583
 
584
  app = FastAPI()
585
 
586
+ @app.get("/declined")
587
+ def test():
588
+ return JSONResponse(content="ok, you can back to huggingface. I just didn't had any idea to how to handle decline soo you are redricted here.")
589
 
590
  @app.get("/api/v1/docs")
591
  def html():