Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,7 +86,7 @@ def load_css():
|
|
| 86 |
|
| 87 |
.rendered-citation {
|
| 88 |
margin: 0.5rem 0;
|
| 89 |
-
font-size: 1.
|
| 90 |
}
|
| 91 |
</style>
|
| 92 |
""", unsafe_allow_html=True)
|
|
@@ -210,18 +210,18 @@ with st.expander("About SCC and Example Citation"):
|
|
| 210 |
<h4>Example Citation</h4>
|
| 211 |
<p><strong>Inputs:</strong></p>
|
| 212 |
<ul>
|
| 213 |
-
<li><strong>Username:</strong>
|
| 214 |
-
<li><strong>Task Name:</strong>
|
| 215 |
<li><strong>Author:</strong> Abuseif et al.</li>
|
| 216 |
-
<li><strong>Year:</strong>
|
| 217 |
<li><strong>URL:</strong> https://www.sciencedirect.com/science/article/pii/S2772411523000046</li>
|
| 218 |
-
<li><strong>Annotated Text:</strong> A proposed design framework for green roof settings in
|
| 219 |
</ul>
|
| 220 |
<p><strong>Outputs:</strong></p>
|
| 221 |
<ul>
|
| 222 |
-
<li><strong>Citation (Start of Text):</strong> <span style="font-size: 1.2rem;">Abuseif et al. (
|
| 223 |
-
<li><strong>Citation (End of Text):</strong> <span style="font-size: 1.2rem;">(Abuseif et al.,
|
| 224 |
-
<li><strong>SCC Index:</strong> <span style="font-size: 0.85rem;">Abuseif et al. (
|
| 225 |
</ul>
|
| 226 |
</div>
|
| 227 |
""", unsafe_allow_html=True)
|
|
@@ -236,24 +236,24 @@ with st.expander("SCC Style Guidelines"):
|
|
| 236 |
<li><strong>Access the Tool:</strong> Open the "Citation Generator" tab.</li>
|
| 237 |
<li><strong>Enter User Information:</strong>
|
| 238 |
<ul>
|
| 239 |
-
<li><strong>Username:</strong> Your unique identifier (e.g.,
|
| 240 |
-
<li><strong>Task Name:</strong> The project or assignment name (e.g.,
|
| 241 |
</ul>
|
| 242 |
</li>
|
| 243 |
<li><strong>Enter Citation Information:</strong>
|
| 244 |
<ul>
|
| 245 |
<li><strong>Author(s) Name:</strong> The author(s) of the source (e.g., Abuseif et al.).</li>
|
| 246 |
-
<li><strong>Publication Year:</strong> The year of publication (e.g.,
|
| 247 |
<li><strong>Source URL:</strong> The full URL of the source, without text fragments (e.g., https://www.sciencedirect.com/science/article/pii/S2772411523000046).</li>
|
| 248 |
-
<li><strong>Annotated Text:</strong> The quoted or paraphrased text from the source (e.g., A proposed design framework for green roof settings).</li>
|
| 249 |
</ul>
|
| 250 |
</li>
|
| 251 |
<li><strong>Generate Citation:</strong> Click the "Generate Citation" button.</li>
|
| 252 |
<li><strong>Copy Outputs:</strong>
|
| 253 |
<ul>
|
| 254 |
-
<li><strong>Citation (Start of Text):</strong> Use "Author (Year)" for the start of a sentence (e.g., Abuseif et al. (
|
| 255 |
-
<li><strong>Citation (End of Text):</strong> Use "(Author, Year)" for in-text citations (e.g., (Abuseif et al.,
|
| 256 |
-
<li><strong>SCC Index:</strong> Copy the index link (e.g., Abuseif et al. (
|
| 257 |
<li>Right-click each link to copy the "Link Address" for verification.</li>
|
| 258 |
</ul>
|
| 259 |
</li>
|
|
@@ -263,13 +263,13 @@ with st.expander("SCC Style Guidelines"):
|
|
| 263 |
<li><strong>Access the Tool:</strong> Open the "Verify Citation" tab.</li>
|
| 264 |
<li><strong>Enter Citation Information:</strong>
|
| 265 |
<ul>
|
| 266 |
-
<li><strong>Citation Text:</strong> Paste the citation text (e.g., Abuseif et al. (
|
| 267 |
<li><strong>Citation URL:</strong> Paste the hyperlink URL from the citation (right-click and select "Copy Link Address").</li>
|
| 268 |
</ul>
|
| 269 |
</li>
|
| 270 |
<li><strong>Enter SCC Index Information:</strong>
|
| 271 |
<ul>
|
| 272 |
-
<li><strong>SCC Index Text:</strong> Paste the index text (e.g., Abuseif et al. (
|
| 273 |
<li><strong>SCC Index URL:</strong> Paste the hyperlink URL from the index (right-click and select "Copy Link Address").</li>
|
| 274 |
</ul>
|
| 275 |
</li>
|
|
@@ -293,23 +293,23 @@ with tabs[0]:
|
|
| 293 |
st.subheader("User Information")
|
| 294 |
col1, col2 = st.columns(2)
|
| 295 |
with col1:
|
| 296 |
-
username = st.text_input("Username", help="Your username for tracking purposes", placeholder="e.g.,
|
| 297 |
with col2:
|
| 298 |
-
task_name = st.text_input("Task Name", help="The name of the task or project", placeholder="e.g.,
|
| 299 |
|
| 300 |
# Citation Info Section
|
| 301 |
st.subheader("Citation Info")
|
| 302 |
col3, col4 = st.columns(2)
|
| 303 |
with col3:
|
| 304 |
-
author_name = st.text_input("Author(s) Name", help="The author(s) of the source", placeholder="e.g.,
|
| 305 |
with col4:
|
| 306 |
publication_year = st.text_input("Publication Year", help="The year of publication", placeholder="e.g., 2023")
|
| 307 |
|
| 308 |
col5, col6 = st.columns(2)
|
| 309 |
with col5:
|
| 310 |
-
source_url = st.text_input("Source URL", help="The full URL of the source", placeholder="https://
|
| 311 |
with col6:
|
| 312 |
-
annotated_text = st.text_input("Annotated Text", help="The text quoted or paraphrased from the source", placeholder="e.g.,
|
| 313 |
|
| 314 |
# Live date and time display
|
| 315 |
st.markdown("### Current Date and Time")
|
|
@@ -358,21 +358,19 @@ with tabs[0]:
|
|
| 358 |
|
| 359 |
# SCC Index
|
| 360 |
st.markdown("### SCC Index")
|
| 361 |
-
st.markdown('<div class="hash-display">', unsafe_allow_html=True)
|
| 362 |
st.markdown(metadata_link, unsafe_allow_html=True)
|
| 363 |
-
st.markdown('</div>', unsafe_allow_html=True)
|
| 364 |
|
| 365 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 366 |
|
| 367 |
with tabs[1]:
|
| 368 |
st.markdown('<div class="tab-content">', unsafe_allow_html=True)
|
| 369 |
st.subheader("Citation Information")
|
| 370 |
-
citation_text = st.text_input("Citation Text", help="Paste the citation text, e.g., 'Abuseif et al. (
|
| 371 |
-
citation_url = st.text_input("Citation URL", help="Paste the hyperlink URL from the citation, e.g., 'https://
|
| 372 |
|
| 373 |
st.subheader("SCC Index")
|
| 374 |
-
hash_text = st.text_input("SCC Index Text", help="Paste the index text, e.g., 'Abuseif et al. (
|
| 375 |
-
hash_url = st.text_input("SCC Index URL", help="Paste the hyperlink URL from the index, e.g., 'https://
|
| 376 |
|
| 377 |
verify_button = st.button("Verify Citation", type="primary", use_container_width=True)
|
| 378 |
|
|
|
|
| 86 |
|
| 87 |
.rendered-citation {
|
| 88 |
margin: 0.5rem 0;
|
| 89 |
+
font-size: 1.4rem; /* Increased font size for generated citations */
|
| 90 |
}
|
| 91 |
</style>
|
| 92 |
""", unsafe_allow_html=True)
|
|
|
|
| 210 |
<h4>Example Citation</h4>
|
| 211 |
<p><strong>Inputs:</strong></p>
|
| 212 |
<ul>
|
| 213 |
+
<li><strong>Username:</strong> Majed</li>
|
| 214 |
+
<li><strong>Task Name:</strong> Trees on Buildings Design</li>
|
| 215 |
<li><strong>Author:</strong> Abuseif et al.</li>
|
| 216 |
+
<li><strong>Year:</strong> 2023</li>
|
| 217 |
<li><strong>URL:</strong> https://www.sciencedirect.com/science/article/pii/S2772411523000046</li>
|
| 218 |
+
<li><strong>Annotated Text:</strong> A proposed design framework for green roof settings in general and trees on buildings in particular</li>
|
| 219 |
</ul>
|
| 220 |
<p><strong>Outputs:</strong></p>
|
| 221 |
<ul>
|
| 222 |
+
<li><strong>Citation (Start of Text):</strong> <span style="font-size: 1.2rem;">Abuseif et al. (2023)</span> (hyperlinked to <code>https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=A%20proposed%20design%20framework%20for%20green%20roof%20settings%20in%20general%20and%20trees%20on%20buildings%20in%20particular</code>)</li>
|
| 223 |
+
<li><strong>Citation (End of Text):</strong> <span style="font-size: 1.2rem;">(Abuseif et al., 2023)</span> (hyperlinked to <code>https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=A%20proposed%20design%20framework%20for%20green%20roof%20settings%20in%20general%20and%20trees%20on%20buildings%20in%20particular</code>)</li>
|
| 224 |
+
<li><strong>SCC Index:</strong> <span style="font-size: 0.85rem;">Abuseif et al. (2023). 7825af167ba0b749651a9b21459c51aa693925f04ad5ee40c07656f9096c6e5f</span> (hyperlinked to <code>https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=Majed%252525E2%25252580%25252594Trees%252520on%252520Buildings%252520Design%252525E2%25252580%252525942025-08-06%252525E2%25252580%2525259419:42:28</code>)</li>
|
| 225 |
</ul>
|
| 226 |
</div>
|
| 227 |
""", unsafe_allow_html=True)
|
|
|
|
| 236 |
<li><strong>Access the Tool:</strong> Open the "Citation Generator" tab.</li>
|
| 237 |
<li><strong>Enter User Information:</strong>
|
| 238 |
<ul>
|
| 239 |
+
<li><strong>Username:</strong> Your unique identifier (e.g., Majed).</li>
|
| 240 |
+
<li><strong>Task Name:</strong> The project or assignment name (e.g., Trees on Buildings Design).</li>
|
| 241 |
</ul>
|
| 242 |
</li>
|
| 243 |
<li><strong>Enter Citation Information:</strong>
|
| 244 |
<ul>
|
| 245 |
<li><strong>Author(s) Name:</strong> The author(s) of the source (e.g., Abuseif et al.).</li>
|
| 246 |
+
<li><strong>Publication Year:</strong> The year of publication (e.g., 2023).</li>
|
| 247 |
<li><strong>Source URL:</strong> The full URL of the source, without text fragments (e.g., https://www.sciencedirect.com/science/article/pii/S2772411523000046).</li>
|
| 248 |
+
<li><strong>Annotated Text:</strong> The quoted or paraphrased text from the source (e.g., A proposed design framework for green roof settings in general and trees on buildings in particular).</li>
|
| 249 |
</ul>
|
| 250 |
</li>
|
| 251 |
<li><strong>Generate Citation:</strong> Click the "Generate Citation" button.</li>
|
| 252 |
<li><strong>Copy Outputs:</strong>
|
| 253 |
<ul>
|
| 254 |
+
<li><strong>Citation (Start of Text):</strong> Use "Author (Year)" for the start of a sentence (e.g., Abuseif et al. (2023)).</li>
|
| 255 |
+
<li><strong>Citation (End of Text):</strong> Use "(Author, Year)" for in-text citations (e.g., (Abuseif et al., 2023)).</li>
|
| 256 |
+
<li><strong>SCC Index:</strong> Copy the index link (e.g., Abuseif et al. (2023). 7825af167ba0b749651a9b21459c51aa693925f04ad5ee40c07656f9096c6e5f) for verification.</li>
|
| 257 |
<li>Right-click each link to copy the "Link Address" for verification.</li>
|
| 258 |
</ul>
|
| 259 |
</li>
|
|
|
|
| 263 |
<li><strong>Access the Tool:</strong> Open the "Verify Citation" tab.</li>
|
| 264 |
<li><strong>Enter Citation Information:</strong>
|
| 265 |
<ul>
|
| 266 |
+
<li><strong>Citation Text:</strong> Paste the citation text (e.g., Abuseif et al. (2023) or (Abuseif et al., 2023)).</li>
|
| 267 |
<li><strong>Citation URL:</strong> Paste the hyperlink URL from the citation (right-click and select "Copy Link Address").</li>
|
| 268 |
</ul>
|
| 269 |
</li>
|
| 270 |
<li><strong>Enter SCC Index Information:</strong>
|
| 271 |
<ul>
|
| 272 |
+
<li><strong>SCC Index Text:</strong> Paste the index text (e.g., Abuseif et al. (2023). 7825af167ba0b749651a9b21459c51aa693925f04ad5ee40c07656f9096c6e5f).</li>
|
| 273 |
<li><strong>SCC Index URL:</strong> Paste the hyperlink URL from the index (right-click and select "Copy Link Address").</li>
|
| 274 |
</ul>
|
| 275 |
</li>
|
|
|
|
| 293 |
st.subheader("User Information")
|
| 294 |
col1, col2 = st.columns(2)
|
| 295 |
with col1:
|
| 296 |
+
username = st.text_input("Username", help="Your username for tracking purposes", placeholder="e.g., Majed")
|
| 297 |
with col2:
|
| 298 |
+
task_name = st.text_input("Task Name", help="The name of the task or project", placeholder="e.g., Trees on Buildings Design")
|
| 299 |
|
| 300 |
# Citation Info Section
|
| 301 |
st.subheader("Citation Info")
|
| 302 |
col3, col4 = st.columns(2)
|
| 303 |
with col3:
|
| 304 |
+
author_name = st.text_input("Author(s) Name", help="The author(s) of the source", placeholder="e.g., Abuseif et al.")
|
| 305 |
with col4:
|
| 306 |
publication_year = st.text_input("Publication Year", help="The year of publication", placeholder="e.g., 2023")
|
| 307 |
|
| 308 |
col5, col6 = st.columns(2)
|
| 309 |
with col5:
|
| 310 |
+
source_url = st.text_input("Source URL", help="The full URL of the source", placeholder="https://www.sciencedirect.com/science/article/pii/S2772411523000046")
|
| 311 |
with col6:
|
| 312 |
+
annotated_text = st.text_input("Annotated Text", help="The text quoted or paraphrased from the source", placeholder="e.g., A proposed design framework for green roof settings...")
|
| 313 |
|
| 314 |
# Live date and time display
|
| 315 |
st.markdown("### Current Date and Time")
|
|
|
|
| 358 |
|
| 359 |
# SCC Index
|
| 360 |
st.markdown("### SCC Index")
|
|
|
|
| 361 |
st.markdown(metadata_link, unsafe_allow_html=True)
|
|
|
|
| 362 |
|
| 363 |
st.markdown('</div>', unsafe_allow_html=True)
|
| 364 |
|
| 365 |
with tabs[1]:
|
| 366 |
st.markdown('<div class="tab-content">', unsafe_allow_html=True)
|
| 367 |
st.subheader("Citation Information")
|
| 368 |
+
citation_text = st.text_input("Citation Text", help="Paste the citation text, e.g., 'Abuseif et al. (2023)' or '(Abuseif et al., 2023)'", placeholder="e.g., Abuseif et al. (2023)")
|
| 369 |
+
citation_url = st.text_input("Citation URL", help="Paste the hyperlink URL from the citation, e.g., 'https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=fragment'", placeholder="e.g., https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=fragment")
|
| 370 |
|
| 371 |
st.subheader("SCC Index")
|
| 372 |
+
hash_text = st.text_input("SCC Index Text", help="Paste the index text, e.g., 'Abuseif et al. (2023). <hash>'", placeholder="e.g., Abuseif et al. (2023). <hash>")
|
| 373 |
+
hash_url = st.text_input("SCC Index URL", help="Paste the hyperlink URL from the index, e.g., 'https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=metadata'", placeholder="e.g., https://www.sciencedirect.com/science/article/pii/S2772411523000046#:~:text=metadata")
|
| 374 |
|
| 375 |
verify_button = st.button("Verify Citation", type="primary", use_container_width=True)
|
| 376 |
|