NLI / app.py
rahideer's picture
Update app.py
7d5ee6e verified
raw
history blame
767 Bytes
import streamlit as st
import zipfile
import os
# Path to your uploaded zip file
ZIP_FILE = "xnli-multilingual-nli-dataset.zip"
EXTRACT_DIR = "extracted_data"
# Extract contents and list files
@st.cache_data
def extract_and_list():
with zipfile.ZipFile(ZIP_FILE, "r") as zip_ref:
zip_ref.extractall(EXTRACT_DIR)
return os.listdir(EXTRACT_DIR)
# App starts here
st.set_page_config(page_title="XNLI Multilingual Viewer")
st.title("πŸ“‚ XNLI Multilingual Dataset Viewer")
if not os.path.exists(ZIP_FILE):
st.error("Zip file not found. Please upload it.")
else:
files = extract_and_list()
st.success("Zip file extracted successfully!")
st.write("Here are the files inside your dataset:")
st.code("\n".join(files), language="text")