TheMaisk commited on
Commit
20b54c6
·
verified ·
1 Parent(s): 90c25dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -21
app.py CHANGED
@@ -95,32 +95,17 @@ def generate(
95
 
96
 
97
  examples = [
98
- "def create_chat_function():
99
- # This function initializes a chat interface
100
- # Initializes a new chat session
101
- chat_session = ChatSession()
102
-
103
- # Function to receive a message from the user
104
- def receive_message():
105
- return input('Enter your message: ')
106
-
107
- # Function to send a message to the chat
108
- def send_message(message):
109
- chat_session.sendMessage(message)
110
- print('Message sent!')
111
-
112
- # Chat loop
113
- while True:
114
- user_input = receive_message()
115
- if user_input.lower() == 'quit':
116
- break
117
- send_message(user_input)
118
- "
119
  ]
120
 
121
 
122
 
123
 
 
124
  def process_example(args):
125
  for x in generate(args):
126
  pass
 
95
 
96
 
97
  examples = [
98
+ "SELECT Name, Email, PurchaseDate\nFROM Customers\nWHERE PurchaseDate >= '2023-01-01'\nORDER BY PurchaseDate DESC;",
99
+ "<!DOCTYPE html>\n<html>\n<head>\n <title>Kontaktiere Uns</title>\n</head>\n<body>\n <h1>Kontaktformular</h1>\n <form action=\"/sendEmail\" method=\"post\">\n Name: <input type=\"text\" name=\"name\"><br>\n E-Mail: <input type=\"text\" name=\"email\"><br>\n Nachricht:<br>\n <textarea name=\"message\" rows=\"5\" cols=\"30\"></textarea><br>\n <input type=\"submit\" value=\"Senden\">\n </form>\n</body>\n</html>",
100
+ "def calculate_bmi(height, weight):\n bmi = weight / (height / 100) ** 2\n return bmi\n\nprint(calculate_bmi(170, 65)) # Beispielaufruf",
101
+ "function sumArray(array) {\n return array.reduce((sum, num) => sum + num, 0);\n}\n\nconsole.log(sumArray([1, 2, 3, 4, 5])); // Gibt 15 aus",
102
+ ".button {\n background-color: blue;\n color: white;\n padding: 10px 20px;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n\n.button:hover {\n box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.5);\n}"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  ]
104
 
105
 
106
 
107
 
108
+
109
  def process_example(args):
110
  for x in generate(args):
111
  pass