smtsead commited on
Commit
484f77f
·
verified ·
1 Parent(s): 61e280e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -257,6 +257,7 @@ def main():
257
  .result-box { border-left: 4px solid #003366; padding: 15px; background-color: #f9f9f9; margin: 20px 0; }
258
  .aspect-badge { background-color: #e6f2ff; padding: 2px 8px; border-radius: 4px; display: inline-block; margin: 2px; }
259
  .response-box { white-space: pre-wrap; font-family: monospace; }
 
260
  </style>
261
  """, unsafe_allow_html=True)
262
 
@@ -338,6 +339,15 @@ def main():
338
 
339
  st.divider()
340
  st.markdown("### Draft Response")
 
 
 
 
 
 
 
 
 
341
  st.markdown(f'<div class="result-box"><div class="response-box">{final_response}</div></div>',
342
  unsafe_allow_html=True)
343
 
 
257
  .result-box { border-left: 4px solid #003366; padding: 15px; background-color: #f9f9f9; margin: 20px 0; }
258
  .aspect-badge { background-color: #e6f2ff; padding: 2px 8px; border-radius: 4px; display: inline-block; margin: 2px; }
259
  .response-box { white-space: pre-wrap; font-family: monospace; }
260
+ .english-response { color: #555555; font-size: 14px; }
261
  </style>
262
  """, unsafe_allow_html=True)
263
 
 
339
 
340
  st.divider()
341
  st.markdown("### Draft Response")
342
+
343
+ # Show English response if original language wasn't English
344
+ if review_lang != 'en':
345
+ st.markdown('<div class="english-response">English version:</div>', unsafe_allow_html=True)
346
+ st.markdown(f'<div class="result-box"><div class="response-box">{response}</div></div>',
347
+ unsafe_allow_html=True)
348
+ st.markdown('<div class="english-response">Translated version:</div>', unsafe_allow_html=True)
349
+
350
+ # Show final response (translated if needed)
351
  st.markdown(f'<div class="result-box"><div class="response-box">{final_response}</div></div>',
352
  unsafe_allow_html=True)
353