Skip to content

Commit

Permalink
slight ui change
Browse files Browse the repository at this point in the history
  • Loading branch information
tmoreau89 committed Aug 28, 2024
1 parent 32635c4 commit a1af100
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ner/ner_solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ def convert_to_json_schema(yaml_str):

octoai_api_key = st.sidebar.text_input("OctoAI API Token [(get yours here)](https://octoai.cloud/n)", type="password")

pdf_file = st.sidebar.file_uploader("Upload your PDF file here", type=".pdf")

# Default schema - in a YAML file format

yaml_format = """
Expand All @@ -51,9 +53,7 @@ def convert_to_json_schema(yaml_str):
desc: executive summary of the document
"""

response_dict = code_editor(code=yaml_format, lang="yaml")

pdf_file = st.file_uploader("Upload your PDF file here", type=".pdf")
code_response = code_editor(code=yaml_format, lang="yaml")

# Set up LlamaParse extractor
parser = LlamaParse(
Expand All @@ -78,7 +78,7 @@ def convert_to_json_schema(yaml_str):
doc_str += "\n"

# Prepare the JSON schema
json_schema = convert_to_json_schema(response_dict['text'])
json_schema = convert_to_json_schema(code_response['text'])

# Let's do some LLM magic here
with st.status("Converting to JSON form..."):
Expand Down

0 comments on commit a1af100

Please sign in to comment.