Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -166,8 +166,7 @@ def visualize_clusters(df):
|
|
| 166 |
def main(file, num_clusters):
|
| 167 |
try:
|
| 168 |
print("Reading the file...")
|
| 169 |
-
|
| 170 |
-
df = pd.read_excel(BytesIO(file_data))
|
| 171 |
print("File read successfully.")
|
| 172 |
|
| 173 |
df = preprocess_data(df)
|
|
@@ -180,7 +179,6 @@ def main(file, num_clusters):
|
|
| 180 |
print("Error occurred:", e)
|
| 181 |
return str(e)
|
| 182 |
|
| 183 |
-
|
| 184 |
interface = gr.Interface(
|
| 185 |
fn=main,
|
| 186 |
inputs=[
|
|
|
|
| 166 |
def main(file, num_clusters):
|
| 167 |
try:
|
| 168 |
print("Reading the file...")
|
| 169 |
+
df = pd.read_excel(file)
|
|
|
|
| 170 |
print("File read successfully.")
|
| 171 |
|
| 172 |
df = preprocess_data(df)
|
|
|
|
| 179 |
print("Error occurred:", e)
|
| 180 |
return str(e)
|
| 181 |
|
|
|
|
| 182 |
interface = gr.Interface(
|
| 183 |
fn=main,
|
| 184 |
inputs=[
|