nettaredam commited on
Commit
3682ecc
Β·
verified Β·
1 Parent(s): aa2991f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -23
app.py CHANGED
@@ -3,14 +3,23 @@ import re
3
  import anthropic
4
  import os
5
 
6
- # βœ… Configura layout
 
 
7
  st.markdown(
8
- "<div style='background-color: #f5f5f5; padding: 20px; border-radius: 10px;'>"
9
- "<h4 style='color: #39FF14;'>βœ… Prompt raffinato</h4>"
10
- f"<p style='color:#000'>{raffinato}</p>"
11
- "</div>",
 
12
  unsafe_allow_html=True
13
  )
 
 
 
 
 
 
14
  st.markdown(
15
  '''
16
  <style>
@@ -22,28 +31,20 @@ st.markdown(
22
  border-radius: 10px;
23
  border: none;
24
  }
 
 
 
 
 
 
 
 
25
  </style>
26
  ''',
27
  unsafe_allow_html=True
28
  )
29
 
30
- <style>
31
- @keyframes pulse {
32
- 0% { box-shadow: 0 0 0 0 rgba(57,255,20, 0.5); }
33
- 70% { box-shadow: 0 0 0 10px rgba(57,255,20, 0); }
34
- 100% { box-shadow: 0 0 0 0 rgba(57,255,20, 0); }
35
- }
36
- .pulsing-button {
37
- animation: pulse 2s infinite;
38
- }
39
- </style>
40
-
41
-
42
- # βœ… Titolo e sottotitolo in verde fluo
43
- st.markdown("<h1 style='text-align: center; color: #39FF14;'>🧠 Prompt Coach</h1>", unsafe_allow_html=True)
44
- st.markdown("<p style='text-align: center; color: #39FF14;'>Scrivi prompt migliori, capendo come si costruiscono.</p>", unsafe_allow_html=True)
45
-
46
- # βœ… Espandi guida con testo verde fluo
47
  with st.expander("πŸ“˜ Le 6 regole fondamentali del prompting"):
48
  st.markdown(
49
  "<div style='color:#39FF14'>"
@@ -111,7 +112,7 @@ with col2:
111
  if st.button("🧠 Analizza il prompt", type="primary"):
112
  if prompt_input.strip():
113
  risultato, raffinato = analizza_e_riscrivi(prompt_input)
114
- st.markdown(f"<div style='color:#39FF14'>{risultato}</div>", unsafe_allow_html=True)
115
  else:
116
  st.warning("⚠️ Inserisci prima un prompt.")
117
 
 
3
  import anthropic
4
  import os
5
 
6
+ st.set_page_config(page_title="Prompt Coach", layout="wide")
7
+
8
+ # βœ… Logo Fluida
9
  st.markdown(
10
+ '''
11
+ <div style='text-align: center; padding: 10px; background-color: white;'>
12
+ <img src='fluida-logo.png' width='160' style='border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);'>
13
+ </div>
14
+ ''',
15
  unsafe_allow_html=True
16
  )
17
+
18
+ # βœ… Titolo e sottotitolo in verde fluo
19
+ st.markdown("<h1 style='text-align: center; color: #39FF14;'>🧠 Prompt Coach</h1>", unsafe_allow_html=True)
20
+ st.markdown("<p style='text-align: center; color: #39FF14;'>Scrivi prompt migliori, capendo come si costruiscono.</p>", unsafe_allow_html=True)
21
+
22
+ # βœ… CSS personalizzato
23
  st.markdown(
24
  '''
25
  <style>
 
31
  border-radius: 10px;
32
  border: none;
33
  }
34
+ @keyframes pulse {
35
+ 0% { box-shadow: 0 0 0 0 rgba(57,255,20, 0.5); }
36
+ 70% { box-shadow: 0 0 0 10px rgba(57,255,20, 0); }
37
+ 100% { box-shadow: 0 0 0 0 rgba(57,255,20, 0); }
38
+ }
39
+ .pulsing-button {
40
+ animation: pulse 2s infinite;
41
+ }
42
  </style>
43
  ''',
44
  unsafe_allow_html=True
45
  )
46
 
47
+ # βœ… Espandi guida
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  with st.expander("πŸ“˜ Le 6 regole fondamentali del prompting"):
49
  st.markdown(
50
  "<div style='color:#39FF14'>"
 
112
  if st.button("🧠 Analizza il prompt", type="primary"):
113
  if prompt_input.strip():
114
  risultato, raffinato = analizza_e_riscrivi(prompt_input)
115
+ st.markdown(f"<div style='background-color: #f5f5f5; padding: 20px; border-radius: 10px; color: #39FF14;'>{risultato}</div>", unsafe_allow_html=True)
116
  else:
117
  st.warning("⚠️ Inserisci prima un prompt.")
118