pauladeeptech commited on
Commit
18a3dcc
·
verified ·
1 Parent(s): cba5e55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -48
app.py CHANGED
@@ -162,54 +162,30 @@ def chat(user_message, history):
162
 
163
 
164
  # -----------------------------
165
- # UI with better styling using Blocks
166
  # -----------------------------
167
- custom_css = """
168
- #chatbot {
169
- height: 600px !important;
170
- }
171
-
172
- #chatbot .message {
173
- border-radius: 12px !important;
174
- padding: 12px 16px !important;
175
- margin: 8px 0 !important;
176
- }
177
- """
178
-
179
- # Use Blocks to wrap ChatInterface and add CSS
180
- with gr.Blocks(css=custom_css, title="📚 HomeworkBuddy") as demo:
181
- gr.Markdown(
182
- """
183
- # 📚 HomeworkBuddy
184
-
185
- **Willkommen bei HomeworkBuddy!**
186
-
187
- Ich helfe dir, schwierige Themen zu VERSTEHEN! Aber Achtung: Ich mache deine Hausaufgaben NICHT für dich -
188
- ich zeige dir, WIE du sie selbst lösen kannst! 🎓
189
-
190
- **Beispiel-Fragen:**
191
- - Was ist Prozentrechnung?
192
- - Erkläre mir das Dreisatz-Prinzip
193
- - Wie funktioniert Photosynthese?
194
- - Ich verstehe Bruchrechnung nicht
195
-
196
- Stell mir deine Fragen! 💪
197
- """
198
- )
199
-
200
- chatbot = gr.ChatInterface(
201
- fn=chat,
202
- examples=[
203
- "Was ist 20% von 150?",
204
- "Erkläre mir Bruchrechnung",
205
- "Wie funktioniert Photosynthese?",
206
- "Was ist das Dreisatz-Prinzip?",
207
- "Kannst du meine Mathe-Hausaufgabe lösen?",
208
- ],
209
- type="messages",
210
- chatbot=gr.Chatbot(elem_id="chatbot", height=600),
211
- )
212
 
213
  if __name__ == "__main__":
214
- demo.launch(ssr_mode=False)
215
-
 
162
 
163
 
164
  # -----------------------------
165
+ # UI - Simple version
166
  # -----------------------------
167
+ demo = gr.ChatInterface(
168
+ fn=chat,
169
+ title="📚 HomeworkBuddy",
170
+ description=(
171
+ "**Willkommen bei HomeworkBuddy!**\n\n"
172
+ "Ich helfe dir, schwierige Themen zu VERSTEHEN! Aber Achtung: Ich mache deine Hausaufgaben NICHT für dich - "
173
+ "ich zeige dir, WIE du sie selbst lösen kannst! 🎓\n\n"
174
+ "**Beispiel-Fragen:**\n"
175
+ "- Was ist Prozentrechnung?\n"
176
+ "- Erkläre mir das Dreisatz-Prinzip\n"
177
+ "- Wie funktioniert Photosynthese?\n"
178
+ "- Ich verstehe Bruchrechnung nicht\n\n"
179
+ "Stell mir deine Fragen! 💪"
180
+ ),
181
+ examples=[
182
+ "Was ist 20% von 150?",
183
+ "Erkläre mir Bruchrechnung",
184
+ "Wie funktioniert Photosynthese?",
185
+ "Was ist das Dreisatz-Prinzip?",
186
+ "Kannst du meine Mathe-Hausaufgabe lösen?",
187
+ ],
188
+ )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
189
 
190
  if __name__ == "__main__":
191
+ demo.launch(ssr_mode=False)