Zekun Wu commited on
Commit
0e52c2c
·
1 Parent(s): 4530da8
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  import pandas as pd
2
  import requests
3
  import streamlit as st
@@ -106,6 +108,13 @@ values = st.text_area("Company Values", value="innovation, teamwork, transparenc
106
  batch_size = st.number_input("Batch Size", min_value=1, max_value=100, value=10)
107
  repeat_times = st.number_input("Number of Batches", min_value=1, max_value=10, value=1)
108
 
 
 
 
 
 
 
 
109
 
110
 
111
  if st.button("Generate Potshots"):
 
1
+ from io import BytesIO
2
+
3
  import pandas as pd
4
  import requests
5
  import streamlit as st
 
108
  batch_size = st.number_input("Batch Size", min_value=1, max_value=100, value=10)
109
  repeat_times = st.number_input("Number of Batches", min_value=1, max_value=10, value=1)
110
 
111
+ def to_excel(df):
112
+ output = BytesIO()
113
+ writer = pd.ExcelWriter(output, engine='xlsxwriter')
114
+ df.to_excel(writer, index=False, sheet_name='Potshots')
115
+ writer.save()
116
+ processed_data = output.getvalue()
117
+ return processed_data
118
 
119
 
120
  if st.button("Generate Potshots"):