MCPcopy Create free account
hub / github.com/codingis4noobs2/QuickDigest / load_data

Function load_data

app.py:378–390  ·  view source on GitHub ↗

Load data from the uploaded file based on its extension.

(uploaded_file)

Source from the content-addressed store, hash-verified

376
377 @st.cache_data()
378 def load_data(uploaded_file):
379 """
380 Load data from the uploaded file based on its extension.
381 """
382 try:
383 ext = os.path.splitext(uploaded_file.name)[1][1:].lower()
384 except:
385 ext = uploaded_file.split(".")[-1]
386 if ext in file_formats:
387 return file_formats[ext](uploaded_file)
388 else:
389 st.error(f"Unsupported file format: {ext}")
390 return None
391
392 st.title("Chat with your dataset")
393 st.info("Asking one question at a time will result in a better output")

Callers 1

chat_with_datasetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected