Spaces:
Running
Running
Liu Yiwen
commited on
Commit
·
f312fcb
1
Parent(s):
ea2cf68
修复了选择target的bug
Browse files- __pycache__/utils.cpython-311.pyc +0 -0
- app.py +1 -1
- utils.py +2 -2
__pycache__/utils.cpython-311.pyc
CHANGED
Binary files a/__pycache__/utils.cpython-311.pyc and b/__pycache__/utils.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -355,4 +355,4 @@ with gr.Blocks() as demo:
|
|
355 |
if __name__ == "__main__":
|
356 |
|
357 |
app = gr.mount_gradio_app(app, demo, path="/")
|
358 |
-
uvicorn.run(app, host="
|
|
|
355 |
if __name__ == "__main__":
|
356 |
|
357 |
app = gr.mount_gradio_app(app, demo, path="/")
|
358 |
+
uvicorn.run(app, host="127.0.0.1", port=7860)
|
utils.py
CHANGED
@@ -47,8 +47,8 @@ def flatten_ndarray_column(df, column_name, rows_to_include):
|
|
47 |
|
48 |
selected_data = df[column_name].apply(select_and_flatten)
|
49 |
|
50 |
-
for i in rows_to_include:
|
51 |
-
df[f'{column_name}_{
|
52 |
|
53 |
return df
|
54 |
|
|
|
47 |
|
48 |
selected_data = df[column_name].apply(select_and_flatten)
|
49 |
|
50 |
+
for i, index in enumerate(rows_to_include):
|
51 |
+
df[f'{column_name}_{index}'] = selected_data.apply(lambda x: x[i])
|
52 |
|
53 |
return df
|
54 |
|