Spaces:
Runtime error
Runtime error
fix import
Browse files
app.py
CHANGED
|
@@ -3,6 +3,13 @@ import requests
|
|
| 3 |
|
| 4 |
enable_xorbits = True
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
st.set_page_config(page_title="Analyzing Text Corpus on Hugging Face", page_icon=":bar_chart:", layout="wide")
|
| 7 |
st.sidebar.title('A Tool for Analyzing Text Corpus on Hugging Face')
|
| 8 |
st.sidebar.markdown(
|
|
@@ -18,14 +25,6 @@ st.sidebar.header("Please Paste The HF Dataset Name Here:")
|
|
| 18 |
#@st.cache_data
|
| 19 |
def load_dataset(j, name, fraction):
|
| 20 |
import os
|
| 21 |
-
|
| 22 |
-
if enable_xorbits:
|
| 23 |
-
import xorbits
|
| 24 |
-
xorbits.init()
|
| 25 |
-
import xorbits.pandas as pd
|
| 26 |
-
else:
|
| 27 |
-
import pandas as pd
|
| 28 |
-
|
| 29 |
if not os.path.exists('%s-train.gzip' % name):
|
| 30 |
with st.spinner('Downloading file from remote server'):
|
| 31 |
import pandas
|
|
|
|
| 3 |
|
| 4 |
enable_xorbits = True
|
| 5 |
|
| 6 |
+
if enable_xorbits:
|
| 7 |
+
import xorbits
|
| 8 |
+
xorbits.init()
|
| 9 |
+
import xorbits.pandas as pd
|
| 10 |
+
else:
|
| 11 |
+
import pandas as pd
|
| 12 |
+
|
| 13 |
st.set_page_config(page_title="Analyzing Text Corpus on Hugging Face", page_icon=":bar_chart:", layout="wide")
|
| 14 |
st.sidebar.title('A Tool for Analyzing Text Corpus on Hugging Face')
|
| 15 |
st.sidebar.markdown(
|
|
|
|
| 25 |
#@st.cache_data
|
| 26 |
def load_dataset(j, name, fraction):
|
| 27 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
if not os.path.exists('%s-train.gzip' % name):
|
| 29 |
with st.spinner('Downloading file from remote server'):
|
| 30 |
import pandas
|