FPll commited on
Commit
51766b7
Β·
verified Β·
1 Parent(s): 9d6ce47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -64,18 +64,15 @@ def respond(message, history):
64
 
65
  # 3. Interfaccia Chat
66
 
67
- # Definiamo il CSS per il bordo scuro
 
68
  custom_css = """
69
  #bordo-scuro {
70
- border: 2px solid #000000 !important;
71
  border-radius: 8px !important;
72
  }
73
- textarea {
74
- background-color: #ffffff !important;
75
- }
76
  """
77
 
78
- # Usiamo gr.Blocks come contenitore principale per iniettare il CSS
79
  with gr.Blocks(css=custom_css) as demo:
80
  gr.ChatInterface(
81
  respond,
@@ -86,11 +83,10 @@ with gr.Blocks(css=custom_css) as demo:
86
  {"left": "$", "right": "$", "display": False}
87
  ]
88
  ),
89
- # 2. Riquadro di testo collegato al nostro CSS
90
  textbox=gr.Textbox(
91
  elem_id="bordo-scuro",
92
- placeholder="πŸ‘‰ Scrivi qui la tua domanda e premi INVIO...",
93
- container=False,
94
  scale=7
95
  ),
96
  title="πŸš€ Limba 1.0 - Progetto Margherita",
@@ -117,5 +113,8 @@ if __name__ == "__main__":
117
  if __name__ == "__main__":
118
  demo.launch(server_name="0.0.0.0", server_port=7860)
119
 
 
 
 
120
  if __name__ == "__main__":
121
  demo.launch(server_name="0.0.0.0", server_port=7860)
 
64
 
65
  # 3. Interfaccia Chat
66
 
67
+ # CSS corretto: manteniamo il bordo scuro ma togliamo il background bianco forzato
68
+ # che causava il problema del testo invisibile sui telefoni in Dark Mode.
69
  custom_css = """
70
  #bordo-scuro {
71
+ border: 2px solid #4a4a4a !important;
72
  border-radius: 8px !important;
73
  }
 
 
 
74
  """
75
 
 
76
  with gr.Blocks(css=custom_css) as demo:
77
  gr.ChatInterface(
78
  respond,
 
83
  {"left": "$", "right": "$", "display": False}
84
  ]
85
  ),
86
+ # 2. Riquadro di testo: ripristiniamo il contenitore per far tornare il tasto INVIA
87
  textbox=gr.Textbox(
88
  elem_id="bordo-scuro",
89
+ placeholder="πŸ‘‰ Scrivi qui la tua domanda...",
 
90
  scale=7
91
  ),
92
  title="πŸš€ Limba 1.0 - Progetto Margherita",
 
113
  if __name__ == "__main__":
114
  demo.launch(server_name="0.0.0.0", server_port=7860)
115
 
116
+ if __name__ == "__main__":
117
+ demo.launch(server_name="0.0.0.0", server_port=7860)
118
+
119
  if __name__ == "__main__":
120
  demo.launch(server_name="0.0.0.0", server_port=7860)