Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -86,15 +86,15 @@ def add_variables(M, L1, L2, LS, A, z, n):
|
|
| 86 |
|
| 87 |
print(df.to_markdown(tablefmt="grid"))
|
| 88 |
df.to_csv("result.csv", index=False)
|
| 89 |
-
return df
|
| 90 |
|
| 91 |
iface = gr.Interface(
|
| 92 |
fn=add_variables,
|
| 93 |
inputs=["number", "number", "number", "number", "number", "number", "number"],
|
| 94 |
-
outputs="dataframe",
|
| 95 |
title="MS",
|
| 96 |
description="输入:|-M: 金属| -L1: 配体1 | -L2: 配体2 | -LS: 含S配体的相对分子质量 | -A: 质谱上对应的分子量 | -z: 电荷 |"
|
| 97 |
)
|
| 98 |
|
| 99 |
-
iface.launch()
|
| 100 |
|
|
|
|
| 86 |
|
| 87 |
print(df.to_markdown(tablefmt="grid"))
|
| 88 |
df.to_csv("result.csv", index=False)
|
| 89 |
+
return df, "result.csv"
|
| 90 |
|
| 91 |
iface = gr.Interface(
|
| 92 |
fn=add_variables,
|
| 93 |
inputs=["number", "number", "number", "number", "number", "number", "number"],
|
| 94 |
+
outputs=["dataframe",'file'],
|
| 95 |
title="MS",
|
| 96 |
description="输入:|-M: 金属| -L1: 配体1 | -L2: 配体2 | -LS: 含S配体的相对分子质量 | -A: 质谱上对应的分子量 | -z: 电荷 |"
|
| 97 |
)
|
| 98 |
|
| 99 |
+
iface.launch(share=True)
|
| 100 |
|