Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Update sscGPT.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NoDataFound authored May 8, 2023
1 parent d539f34 commit b25d3e4
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions tools/sscGPT/sscGPT.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,17 +306,8 @@ def parse_html_to_text(html_content):

file = st.sidebar.file_uploader("Choose a file")
if file is not None:
content = file.read().decode("utf-8")
content_lines = content.split("\n")








#st.write(content)
content = file.readlines().decode("utf-8")
#content_lines = content.split("\n")

sscassetlogo_col, sscassetquery_col = st.sidebar.columns([1, 10])

Expand Down Expand Up @@ -421,7 +412,8 @@ def parse_html_to_text(html_content):
mime="text/csv",
)
elif search_type == "File Upload":
for line in content_lines:
results = search_assets(query)
for line in content:
line = line.strip()
for chunk in line:

Expand All @@ -438,7 +430,7 @@ def parse_html_to_text(html_content):
textout.write("\n")
with open(jsondir, "r", encoding="UTF-8") as file:
json_content = file.read()

json_button = st.download_button(
label="Download JSON",
data=json_content,
Expand All @@ -447,7 +439,7 @@ def parse_html_to_text(html_content):
)
with open(csvdir, "r", encoding="UTF-8") as file:
csv_content = file.read()

csv_button = st.download_button(
label="Download CSV",
data=csv_content,
Expand Down

0 comments on commit b25d3e4

Please sign in to comment.