Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ file_path = 'poem_data.csv'
|
|
20 |
# Create a button to submit the data
|
21 |
if st.button('Submit'):
|
22 |
# Create a DataFrame from the input data
|
23 |
-
new_data = pd.DataFrame({'
|
24 |
|
25 |
|
26 |
|
@@ -41,7 +41,7 @@ if st.button('Submit'):
|
|
41 |
# st.write(data)
|
42 |
|
43 |
# Calculate the number of poems for each poetic form
|
44 |
-
poem_counts = pd.read_csv(file_path)['
|
45 |
|
46 |
# Display progress bars for each poetic form
|
47 |
st.subheader('Poem Submission Progress')
|
|
|
20 |
# Create a button to submit the data
|
21 |
if st.button('Submit'):
|
22 |
# Create a DataFrame from the input data
|
23 |
+
new_data = pd.DataFrame({'text': [poem], 'form': [poetic_form]})
|
24 |
|
25 |
|
26 |
|
|
|
41 |
# st.write(data)
|
42 |
|
43 |
# Calculate the number of poems for each poetic form
|
44 |
+
poem_counts = pd.read_csv(file_path)['form'].value_counts().reindex(poetic_forms, fill_value=0)
|
45 |
|
46 |
# Display progress bars for each poetic form
|
47 |
st.subheader('Poem Submission Progress')
|