srinuksv commited on
Commit
7f3fc7b
1 Parent(s): 1e53dd8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -44
app.py CHANGED
@@ -98,56 +98,33 @@ def predict(message, history):
98
  return response_with_logo
99
  # Custom CSS for styling
100
  css = '''
101
- .gradio-logo {
102
- text-align: center;
103
- margin-bottom: 20px;
104
- }
105
  .circle-logo {
106
- display: inline-block;
107
- width: 40px;
108
- height: 40px;
109
- border-radius: 50%;
110
- overflow: hidden;
111
- margin-right: 10px;
112
- vertical-align: middle;
113
- }
114
- .circle-logo img {
115
- width: 100%;
116
- height: 100%;
117
- object-fit: cover;
118
- }
119
- .response-with-logo {
120
- display: flex;
121
- align-items: center;
122
- margin-bottom: 10px;
123
- }
124
- footer {
125
- display: none !important;
126
- background-color: #F8D7DA;
127
- }
128
 
129
  '''
130
- """
131
-
132
- logo_html = '''
133
- <div class="gradio-logo">
134
- <img src="https://i.ibb.co/xfWKwkG/Screenshot-2024-07-08-032131.png" alt="FernAi" style="display: block; margin: 0 auto; width: 100px; height: 100px;">
135
- </div>
136
- '''
137
-
138
- # Create the Blocks layout with the custom HTML and ChatInterface
139
- with gr.Blocks(theme=gr.themes.Monochrome(), fill_height=True, css=css) as demo:
140
- with gr.Column():
141
- gr.HTML(logo_html)
142
- gr.ChatInterface(predict, clear_btn=None, undo_btn=None, retry_btn=None)
143
-
144
- # Launch the interface
145
- demo.launch()
146
- """
147
  gr.ChatInterface(predict,
148
  title="FernAi_chatBot",
149
  css=css,
150
  description="Ask any Redfernstech any questions",
151
  clear_btn=None, undo_btn=None, retry_btn=None,
152
  examples=['Tell me about Redfernstech?', 'Services in Redfernstech?']
153
- ).launch() # Launching the web interface.
 
98
  return response_with_logo
99
  # Custom CSS for styling
100
  css = '''
 
 
 
 
101
  .circle-logo {
102
+ display: inline-block;
103
+ width: 40px;
104
+ height: 40px;
105
+ border-radius: 50%;
106
+ overflow: hidden;
107
+ margin-right: 10px;
108
+ vertical-align: middle;
109
+ }
110
+
111
+ .circle-logo img {
112
+ width: 100%;
113
+ height: 100%;
114
+ object-fit: cover;
115
+ }
116
+
117
+ .response-with-logo {
118
+ display: flex;
119
+ align-items: center;
120
+ margin-bottom: 10px;
121
+ }
 
 
122
 
123
  '''
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  gr.ChatInterface(predict,
125
  title="FernAi_chatBot",
126
  css=css,
127
  description="Ask any Redfernstech any questions",
128
  clear_btn=None, undo_btn=None, retry_btn=None,
129
  examples=['Tell me about Redfernstech?', 'Services in Redfernstech?']
130
+ ).launch()