maom commited on
Commit
8f33cca
·
verified ·
1 Parent(s): 774bbad

add test chart

Browse files
Files changed (1) hide show
  1. app.py +35 -2
app.py CHANGED
@@ -1,4 +1,37 @@
1
  import streamlit as st
 
 
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import streamlit as st
2
+ import numpy as np
3
+ import pandas as pd
4
+ import altair as alt
5
 
6
+
7
+ gene_id_1 = st.text_input(
8
+ label = "Gene 1",
9
+ value = "CNAG0000001",
10
+ max_chars = 20,
11
+ help = "CNAG Gene ID e.g. CNAG0000001")
12
+
13
+ gene_id_2 = st.text_input(
14
+ label = "Gene 2",
15
+ value = "CNAG0000002",
16
+ max_chars = 20,
17
+ help = "CNAG Gene ID e.g. CNAG0000002")
18
+
19
+
20
+ chart_data = pd.DataFrame(
21
+ np.random.randn(20, 3),
22
+ columns=["a", "b", "c"])
23
+
24
+ chart = (
25
+ alt.Chart(chart_data)
26
+ .mark_circle()
27
+ .encode(
28
+ x="a",
29
+ y="b",
30
+ size="c",
31
+ color="c",
32
+ tooltip=["a", "b", "c"])
33
+ )
34
+
35
+ st.altair_chart(
36
+ chart,
37
+ use_container_width=True)