Geraldine commited on
Commit
0a91dfe
·
verified ·
1 Parent(s): bc45760

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +37 -5
app.py CHANGED
@@ -13,10 +13,42 @@ from transformers import AutoModel, AutoTokenizer, pipeline
13
  import joblib
14
  from typing import List
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  def setup_page():
17
  st.set_page_config(page_title="EAD Generation", layout="wide")
18
  display_app_header()
19
-
20
  # Create two columns - one for query history and one for main content
21
  col1, col2 = st.columns([1, 4])
22
 
@@ -33,14 +65,14 @@ def display_app_header():
33
  """Display the header of the Streamlit app."""
34
  st.title("EAD Generation")
35
  #st.subheader("Tries")
36
- st.markdown("---")
37
  # Add a description of the app
38
- st.markdown("""This app allows you to generate EAD/XML archival descriptions. See this serie of blog posts for explanations :
39
-
40
  - [https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm](https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm)
41
  - [https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm-rag-23](https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm-rag-23)
42
  - [https://iaetbibliotheques.fr/2024/12/comment-apprendre-lead-a-un-llm-fine-tuning-33](https://iaetbibliotheques.fr/2024/12/comment-apprendre-lead-a-un-llm-fine-tuning-33)
43
- """)
44
  st.markdown("---")
45
 
46
  # Display the header of the app and get columns
 
13
  import joblib
14
  from typing import List
15
 
16
+ # Define styles for different sections
17
+ custom_styles = """
18
+ <style>
19
+ [id^=tabs-] {
20
+ padding: 20px;
21
+ border: 1px solid #ccc;
22
+ margin-bottom: 20px;
23
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1);
24
+ }
25
+
26
+ .tab h2 {
27
+ font-size: 24px;
28
+ margin-top: 0;
29
+ color: black;
30
+ }
31
+
32
+ .response-container {
33
+ padding: 20px;
34
+ border: 1px solid #ccc;
35
+ background-color: #f9f9f9;
36
+ margin-bottom: 20px;
37
+ box-shadow: 0 4px 8px rgba(0,0,0,0.1);
38
+ }
39
+
40
+ .response-container h3 {
41
+ font-size: 20px;
42
+ margin-top: 0;
43
+ color: black;
44
+ }
45
+ </style>
46
+ """
47
+
48
  def setup_page():
49
  st.set_page_config(page_title="EAD Generation", layout="wide")
50
  display_app_header()
51
+ st.markdown(custom_styles, unsafe_allow_html=True)
52
  # Create two columns - one for query history and one for main content
53
  col1, col2 = st.columns([1, 4])
54
 
 
65
  """Display the header of the Streamlit app."""
66
  st.title("EAD Generation")
67
  #st.subheader("Tries")
68
+ st.markdown("---")
69
  # Add a description of the app
70
+ st.markdown("""This app allows you to generate EAD/XML archival descriptions. See this serie of blog posts for explanations :""")
71
+ st.markdown("""
72
  - [https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm](https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm)
73
  - [https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm-rag-23](https://iaetbibliotheques.fr/2024/11/comment-apprendre-lead-a-un-llm-rag-23)
74
  - [https://iaetbibliotheques.fr/2024/12/comment-apprendre-lead-a-un-llm-fine-tuning-33](https://iaetbibliotheques.fr/2024/12/comment-apprendre-lead-a-un-llm-fine-tuning-33)
75
+ """, unsafe_allow_html=True)
76
  st.markdown("---")
77
 
78
  # Display the header of the app and get columns