rubenroy commited on
Commit
8e79c3b
·
verified ·
1 Parent(s): 7e3b179

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -1
app.py CHANGED
@@ -78,6 +78,35 @@ TITLE_HTML = """
78
  font-size: 0.9rem;
79
  color: #94a3b8;
80
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  </style>
82
 
83
  <div style="background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 1.5rem; border-radius: 1.5rem; text-align: center; margin: 1rem auto; max-width: 1200px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
@@ -125,9 +154,23 @@ TITLE_HTML = """
125
  </div>
126
  """
127
 
 
 
 
 
 
 
 
 
 
128
  with gr.Blocks() as demo:
129
  gr.HTML(TITLE_HTML)
130
- chat_interface = gr.ChatInterface(
 
131
  fn=generate,
 
 
 
132
  )
 
133
  demo.launch(share=True)
 
78
  font-size: 0.9rem;
79
  color: #94a3b8;
80
  }
81
+ .examples-section {
82
+ background: rgba(255, 255, 255, 0.05);
83
+ padding: 1.5rem;
84
+ border-radius: 1rem;
85
+ margin-top: 1.5rem;
86
+ border: 1px solid rgba(255, 255, 255, 0.1);
87
+ }
88
+ .example-card {
89
+ background: rgba(37, 99, 235, 0.1);
90
+ padding: 1rem;
91
+ border-radius: 0.5rem;
92
+ margin-bottom: 1rem;
93
+ cursor: pointer;
94
+ transition: all 0.2s ease;
95
+ border: 1px solid rgba(37, 99, 235, 0.2);
96
+ }
97
+ .example-card:hover {
98
+ background: rgba(37, 99, 235, 0.15);
99
+ transform: translateY(-2px);
100
+ }
101
+ .example-title {
102
+ color: #60a5fa;
103
+ font-weight: 600;
104
+ margin-bottom: 0.5rem;
105
+ }
106
+ .example-description {
107
+ color: #94a3b8;
108
+ font-size: 0.9rem;
109
+ }
110
  </style>
111
 
112
  <div style="background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 1.5rem; border-radius: 1.5rem; text-align: center; margin: 1rem auto; max-width: 1200px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);">
 
154
  </div>
155
  """
156
 
157
+ examples = [
158
+ ["Explain quantum computing in simple terms"],
159
+ ["Write a short story about a time traveler"],
160
+ ["What are some tips for learning a new programming language?"],
161
+ ["Can you help me solve this math problem: If x² + 5x + 6 = 0, what are the values of x?"],
162
+ ["Explain the process of photosynthesis"],
163
+ ["What are the key differences between machine learning and deep learning?"]
164
+ ]
165
+
166
  with gr.Blocks() as demo:
167
  gr.HTML(TITLE_HTML)
168
+
169
+ chatbot = gr.ChatInterface(
170
  fn=generate,
171
+ examples=examples,
172
+ title="Chat with Zurich",
173
+ description="Ask me anything! I'm here to help with explanations, coding, math, writing, and more.",
174
  )
175
+
176
  demo.launch(share=True)