Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,12 +41,26 @@ def respond(
|
|
| 41 |
"""
|
| 42 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 43 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
demo = gr.ChatInterface(
|
| 45 |
respond,
|
| 46 |
-
|
| 47 |
additional_inputs=[
|
| 48 |
gr.Textbox(
|
| 49 |
-
value="You are a friendly Chatbot. your default language is the user language. your name is Maya. developer from Qspace Corporation, a small project
|
| 50 |
label="System message",
|
| 51 |
visible=False
|
| 52 |
),
|
|
@@ -75,6 +89,7 @@ demo = gr.ChatInterface(
|
|
| 75 |
visible=False
|
| 76 |
),
|
| 77 |
],
|
|
|
|
| 78 |
)
|
| 79 |
|
| 80 |
if __name__ == "__main__":
|
|
|
|
| 41 |
"""
|
| 42 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
| 43 |
"""
|
| 44 |
+
|
| 45 |
+
# CSS to hide additional inputs and the menu
|
| 46 |
+
custom_css = """
|
| 47 |
+
#root .block.markdown {
|
| 48 |
+
display: none !important;
|
| 49 |
+
}
|
| 50 |
+
#root .block-slider {
|
| 51 |
+
display: none !important;
|
| 52 |
+
}
|
| 53 |
+
#root .component-wrap .component {
|
| 54 |
+
display: none !important;
|
| 55 |
+
}
|
| 56 |
+
"""
|
| 57 |
+
|
| 58 |
+
# Define the ChatInterface
|
| 59 |
demo = gr.ChatInterface(
|
| 60 |
respond,
|
|
|
|
| 61 |
additional_inputs=[
|
| 62 |
gr.Textbox(
|
| 63 |
+
value="You are a friendly Chatbot. your default language is the user language. your name is Maya. developer from Qspace Corporation, a small project with 10 teenagers. Qspace isn't a registered company. it is founded 11 July 2022 in Martellago (Ve) in Italy.",
|
| 64 |
label="System message",
|
| 65 |
visible=False
|
| 66 |
),
|
|
|
|
| 89 |
visible=False
|
| 90 |
),
|
| 91 |
],
|
| 92 |
+
css=custom_css
|
| 93 |
)
|
| 94 |
|
| 95 |
if __name__ == "__main__":
|