AnkitkumarMalde commited on
Commit
f8c6721
·
verified ·
1 Parent(s): 93b086c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -34
app.py CHANGED
@@ -81,40 +81,6 @@ demo = gr.ChatInterface(
81
  layout="bubble"
82
  )
83
  )
84
- # Custom CSS for a sleek, modern look
85
- css = """
86
- .gradio-container { background-color: #f0f2f5; }
87
- #title { text-align: center; color: #2d3436; font-family: 'Arial'; }
88
- #chat-box { border-radius: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
89
- """
90
-
91
- with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
92
- gr.Markdown("# 🤖 Advanced Chat Interface", elem_id="title")
93
-
94
- with gr.Row():
95
- with gr.Column(scale=4):
96
- chatbot = gr.Chatbot(elem_id="chat-box", height=500)
97
- msg = gr.Textbox(show_label=False, placeholder="Enter text and press enter...")
98
-
99
- with gr.Column(scale=1):
100
- gr.Markdown("### Settings")
101
- temp = gr.Slider(0, 1, value=0.7, label="Creativity (Temperature)")
102
- clear = gr.Button("Clear Conversation")
103
-
104
- # Link functionality
105
- def user(user_message, history):
106
- return "", history + [[user_message, None]]
107
-
108
- def bot(history):
109
- # Your chatbot logic here
110
- bot_message = "This is a styled response!"
111
- history[-1][1] = bot_message
112
- return history
113
-
114
- msg.submit(user, [msg, chatbot], [msg, chatbot], queue=False).then(
115
- bot, chatbot, chatbot
116
- )
117
- clear.click(lambda: None, None, chatbot, queue=False)
118
 
119
  if __name__ == "__main__":
120
  demo.launch()
 
81
  layout="bubble"
82
  )
83
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
  if __name__ == "__main__":
86
  demo.launch()