Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,17 +27,21 @@ st.markdown("""
|
|
27 |
display: flex;
|
28 |
flex-wrap: wrap;
|
29 |
gap: 1rem;
|
|
|
30 |
}
|
31 |
.flashcard {
|
32 |
width: 250px;
|
33 |
height: 200px;
|
34 |
-
border:
|
35 |
border-radius: 5px;
|
36 |
font-size: 16px;
|
37 |
color: black;
|
38 |
-
background-color: #
|
39 |
perspective: 1000px;
|
40 |
cursor: pointer;
|
|
|
|
|
|
|
41 |
}
|
42 |
.flashcard-inner {
|
43 |
position: relative;
|
@@ -60,10 +64,10 @@ st.markdown("""
|
|
60 |
padding: 1rem;
|
61 |
}
|
62 |
.flashcard-front {
|
63 |
-
background-color: #
|
64 |
}
|
65 |
.flashcard-back {
|
66 |
-
background-color: #
|
67 |
transform: rotateY(180deg);
|
68 |
}
|
69 |
</style>
|
@@ -80,9 +84,9 @@ if 'flashcards' not in st.session_state:
|
|
80 |
st.session_state.flashcards = ""
|
81 |
|
82 |
# Display the title and introduction
|
83 |
-
st.title("
|
84 |
st.write("""
|
85 |
-
Welcome to the
|
86 |
extracting main points, and creating flashcards. Follow the instructions to enter your text and generate content.
|
87 |
""")
|
88 |
|
@@ -101,11 +105,8 @@ if input_text != st.session_state.input_text:
|
|
101 |
st.session_state.input_text = input_text
|
102 |
|
103 |
# Text Processing
|
|
|
104 |
if st.session_state.input_text:
|
105 |
-
AI71_API_KEY = get_ai71_api_key()
|
106 |
-
|
107 |
-
st.subheader("Text Processing")
|
108 |
-
|
109 |
# Caching API call function
|
110 |
@st.cache_data
|
111 |
def generate_response(system_message, user_message):
|
|
|
27 |
display: flex;
|
28 |
flex-wrap: wrap;
|
29 |
gap: 1rem;
|
30 |
+
overflow-x: auto; /* Allow horizontal scrolling if needed */
|
31 |
}
|
32 |
.flashcard {
|
33 |
width: 250px;
|
34 |
height: 200px;
|
35 |
+
border: 2px solid #4682b4; /* Steel Blue border */
|
36 |
border-radius: 5px;
|
37 |
font-size: 16px;
|
38 |
color: black;
|
39 |
+
background-color: #f0f8ff; /* Alice Blue background */
|
40 |
perspective: 1000px;
|
41 |
cursor: pointer;
|
42 |
+
display: flex;
|
43 |
+
align-items: center;
|
44 |
+
justify-content: center;
|
45 |
}
|
46 |
.flashcard-inner {
|
47 |
position: relative;
|
|
|
64 |
padding: 1rem;
|
65 |
}
|
66 |
.flashcard-front {
|
67 |
+
background-color: #f0f8ff; /* Alice Blue background */
|
68 |
}
|
69 |
.flashcard-back {
|
70 |
+
background-color: #ffffff; /* White background for the back */
|
71 |
transform: rotateY(180deg);
|
72 |
}
|
73 |
</style>
|
|
|
84 |
st.session_state.flashcards = ""
|
85 |
|
86 |
# Display the title and introduction
|
87 |
+
st.title("AI71 Text Processing Tool")
|
88 |
st.write("""
|
89 |
+
Welcome to the AI71 Text Processing Tool! This application helps you process text by summarizing content,
|
90 |
extracting main points, and creating flashcards. Follow the instructions to enter your text and generate content.
|
91 |
""")
|
92 |
|
|
|
105 |
st.session_state.input_text = input_text
|
106 |
|
107 |
# Text Processing
|
108 |
+
st.subheader("Text Processing")
|
109 |
if st.session_state.input_text:
|
|
|
|
|
|
|
|
|
110 |
# Caching API call function
|
111 |
@st.cache_data
|
112 |
def generate_response(system_message, user_message):
|