ciaochris commited on
Commit
f2f28b2
·
verified ·
1 Parent(s): 6b704ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -23,7 +23,7 @@ class HumanTouchApp:
23
  return Groq(api_key=api_key)
24
 
25
  def _load_system_prompt(self) -> str:
26
- # This one prompt powers both modes, using context to differentiate tasks.
27
  return """
28
  You are HumanTouch, an AI specializing in transforming text into emotionally resonant communication.
29
  Your output style is guided by two scores: Style (0=Logical, 100=Poetic) and Tone (0=Formal, 100=Passionate).
@@ -100,7 +100,6 @@ class HumanTouchApp:
100
  def create_interface():
101
  app = HumanTouchApp()
102
 
103
- # This CSS combines the light, colorful aesthetic with the components of the tabbed interface.
104
  custom_css = """
105
  /* --- Main Background and Font --- */
106
  body, #main_container {
@@ -156,6 +155,21 @@ def create_interface():
156
 
157
  #chat_input textarea { border-radius: 9999px !important; border: 2px solid #E2E8F0; }
158
  #compose_btn { background: #4299E1; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  """
160
 
161
  with gr.Blocks(css=custom_css, title="HumanTouch") as interface:
@@ -211,7 +225,7 @@ def create_interface():
211
 
212
 
213
  if __name__ == "__main__":
214
- logging.info("Launching HumanTouch App with Blended UI and Light Theme...")
215
  try:
216
  interface = create_interface()
217
  interface.launch(debug=True)
 
23
  return Groq(api_key=api_key)
24
 
25
  def _load_system_prompt(self) -> str:
26
+ # This one prompt now powers both modes, using context to differentiate tasks.
27
  return """
28
  You are HumanTouch, an AI specializing in transforming text into emotionally resonant communication.
29
  Your output style is guided by two scores: Style (0=Logical, 100=Poetic) and Tone (0=Formal, 100=Passionate).
 
100
  def create_interface():
101
  app = HumanTouchApp()
102
 
 
103
  custom_css = """
104
  /* --- Main Background and Font --- */
105
  body, #main_container {
 
155
 
156
  #chat_input textarea { border-radius: 9999px !important; border: 2px solid #E2E8F0; }
157
  #compose_btn { background: #4299E1; }
158
+
159
+ /* --- Responsive Fix for Mobile --- */
160
+ @media (max-width: 768px) {
161
+ #header h1 { font-size: 1.8rem; }
162
+ #header p { font-size: 1rem; margin-bottom: 1rem; }
163
+ .gradio-tabs { padding: 0.5rem; }
164
+
165
+ /* Reduce height on mobile to prevent pushing content off-screen */
166
+ #humanizer_input, #humanizer_output {
167
+ min-height: 25vh; /* Was 45vh, which is too tall for mobile */
168
+ }
169
+ #symbiotic_canvas {
170
+ height: 55vh !important; /* Was 60vh, reduced to give more room */
171
+ }
172
+ }
173
  """
174
 
175
  with gr.Blocks(css=custom_css, title="HumanTouch") as interface:
 
225
 
226
 
227
  if __name__ == "__main__":
228
+ logging.info("Launching HumanTouch App with Mobile Responsive Fix...")
229
  try:
230
  interface = create_interface()
231
  interface.launch(debug=True)