Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -868,7 +868,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 868 |
here = Path(__file__).parent
|
| 869 |
import matplotlib as mpl
|
| 870 |
@output(suspend_when_hidden=True)
|
| 871 |
-
@render.plot
|
| 872 |
def plot():
|
| 873 |
#ds = load_dataset('Hack90/virus_tiny')
|
| 874 |
df = pd.read_parquet('virus_ds.parquet')
|
|
@@ -893,6 +893,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 893 |
filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
|
| 894 |
fig = plot_persistence_homology(filtered_df['Sequence'], filtered_df['Organism_Name'])
|
| 895 |
return fig
|
|
|
|
| 896 |
# with ui.nav_panel("Viral Model"):
|
| 897 |
# gr.load("models/Hack90/virus_pythia_31_1024").launch()
|
| 898 |
|
|
@@ -913,7 +914,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 913 |
|
| 914 |
import matplotlib as mpl
|
| 915 |
@output(suspend_when_hidden=True)
|
| 916 |
-
@render.plot
|
| 917 |
def plot():
|
| 918 |
df = pd.read_csv('kmers.csv')
|
| 919 |
k = input.kmer()
|
|
@@ -939,7 +940,7 @@ with ui.navset_card_tab(id="tab"):
|
|
| 939 |
ax.set_ylabel("Percentage")
|
| 940 |
ax.set_xticklabels(df['kmer'], rotation=90)
|
| 941 |
return fig
|
| 942 |
-
|
| 943 |
# with ui.nav_panel("Viral Model Training"):
|
| 944 |
# ui.page_opts(fillable=True)
|
| 945 |
# ui.panel_title("Does context size matter for a nucleotide model?")
|
|
|
|
| 868 |
here = Path(__file__).parent
|
| 869 |
import matplotlib as mpl
|
| 870 |
@output(suspend_when_hidden=True)
|
| 871 |
+
@render.plot(output_id="plot_macro_output")
|
| 872 |
def plot():
|
| 873 |
#ds = load_dataset('Hack90/virus_tiny')
|
| 874 |
df = pd.read_parquet('virus_ds.parquet')
|
|
|
|
| 893 |
filtered_df = df.groupby('Organism_Name').apply(filter_and_select).reset_index(drop=True)
|
| 894 |
fig = plot_persistence_homology(filtered_df['Sequence'], filtered_df['Organism_Name'])
|
| 895 |
return fig
|
| 896 |
+
ui.output_plot("plot_macro_output")
|
| 897 |
# with ui.nav_panel("Viral Model"):
|
| 898 |
# gr.load("models/Hack90/virus_pythia_31_1024").launch()
|
| 899 |
|
|
|
|
| 914 |
|
| 915 |
import matplotlib as mpl
|
| 916 |
@output(suspend_when_hidden=True)
|
| 917 |
+
@render.plot(output_id="plot_micro_output")
|
| 918 |
def plot():
|
| 919 |
df = pd.read_csv('kmers.csv')
|
| 920 |
k = input.kmer()
|
|
|
|
| 940 |
ax.set_ylabel("Percentage")
|
| 941 |
ax.set_xticklabels(df['kmer'], rotation=90)
|
| 942 |
return fig
|
| 943 |
+
ui.output_plot("plot_micro_output")
|
| 944 |
# with ui.nav_panel("Viral Model Training"):
|
| 945 |
# ui.page_opts(fillable=True)
|
| 946 |
# ui.panel_title("Does context size matter for a nucleotide model?")
|