nmarafo commited on
Commit
3e88b6e
verified
1 Parent(s): 71e5666

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -23
app.py CHANGED
@@ -79,26 +79,7 @@ def chat_stream_completion(message, history, system_prompt):
79
  message_repl += chunk['choices'][0]["delta"]["content"]
80
  yield message_repl
81
 
82
- # Interfaz de Gradio con la descripci贸n y configuraci贸n adicional
83
- with gr.Blocks() as demo:
84
- gr.Markdown("# Child-Safe-Chatbot (Experimental)")
85
- gr.Markdown("""
86
- ### Description
87
- This chatbot is designed to assist users while ensuring that all interactions comply with defined safety policies. It checks whether user inputs violate any of the following categories:
88
-
89
- - Dangerous Content
90
- - Harassment
91
- - Hate Speech
92
- - Sexually Explicit Information
93
-
94
- The chatbot will inform the user if any violation occurs and, if not, will proceed to respond to the user's message in a friendly manner.
95
-
96
- I'm Norberto Mart铆n Afonso. Follow me on [Twitter](https://twitter.com/norbertomartnaf) and [GitHub](https://github.com/nmarafo) for more updates and projects!
97
- """)
98
-
99
- gr.ChatInterface(
100
- chat_stream_completion,
101
- additional_inputs=[gr.Textbox("You are a helpful AI.", label="System Prompt")]
102
- ).queue().launch(server_name="0.0.0.0")
103
-
104
- demo.launch(debug=True)
 
79
  message_repl += chunk['choices'][0]["delta"]["content"]
80
  yield message_repl
81
 
82
+ gr.ChatInterface(
83
+ chat_stream_completion,
84
+ additional_inputs=[gr.Textbox("You are a helpful AI.", label="System Prompt")]
85
+ ).queue().launch(server_name="0.0.0.0")