CCockrum commited on
Commit
7d31651
·
verified ·
1 Parent(s): 6c46cd0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -3
app.py CHANGED
@@ -17,6 +17,32 @@ body {
17
  padding-top: 2rem;
18
  padding-bottom: 2rem;
19
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  #chat-panel {
21
  background-color: rgba(255, 255, 255, 0.85);
22
  padding: 2rem;
@@ -88,11 +114,16 @@ def respond(message, history, user_level, max_tokens, temperature, top_p):
88
  yield f"Désolé! There was an error: {str(e)}"
89
 
90
  # Gradio interface
91
- with gr.Blocks(css=css) as demo:
92
- gr.Markdown("French Instructor", elem_id="custom-title")
 
 
 
 
 
93
 
94
  with gr.Column(elem_id="chat-panel"):
95
- with gr.Accordion("⚙️ Advanced Settings", open=False):
96
  user_level = gr.Dropdown(
97
  choices=["A1", "A2", "B1", "B2", "C1", "C2"],
98
  value="A1",
 
17
  padding-top: 2rem;
18
  padding-bottom: 2rem;
19
  }
20
+ #title-container {
21
+ background-color: rgba(255, 255, 255, 0.85); /* match chat panel */
22
+ border-radius: 16px;
23
+ padding: 1.5rem 2rem;
24
+ margin: 2rem 0;
25
+ width: fit-content;
26
+ max-width: 350px;
27
+ text-align: left;
28
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
29
+ margin-left: 0rem; /* Aligns left edge */
30
+ }
31
+ #title-container h1 {
32
+ color: #222 !important;
33
+ font-size: 4rem;
34
+ font-family: 'Noto Sans JP', sans-serif;
35
+ margin: 0;
36
+ }
37
+ #title-container .subtitle {
38
+ font-size: 1.1rem;
39
+ font-family: 'Noto Sans', sans-serif;
40
+ color: #222 !important;
41
+ margin-top: 0.5rem;
42
+ margin-bottom: 0;
43
+ width: 100%;
44
+ display: block;
45
+ }
46
  #chat-panel {
47
  background-color: rgba(255, 255, 255, 0.85);
48
  padding: 2rem;
 
114
  yield f"Désolé! There was an error: {str(e)}"
115
 
116
  # Gradio interface
117
+ #gr.Markdown("日本語の先生 Japanese Instructor", elem_id="custom-title")
118
+ gr.HTML("""
119
+ <div id="title-container">
120
+ <h1>LE PROFESSEUR</h1>
121
+ <p class="subtitle">French Tutor</p>
122
+ </div>
123
+ """)
124
 
125
  with gr.Column(elem_id="chat-panel"):
126
+ with gr.Accordion("Advanced Settings", open=False):
127
  user_level = gr.Dropdown(
128
  choices=["A1", "A2", "B1", "B2", "C1", "C2"],
129
  value="A1",