PrakhAI commited on
Commit
7c7a530
·
1 Parent(s): 1432a6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -26
app.py CHANGED
@@ -1,5 +1,4 @@
1
  import streamlit as st
2
- from streamlit_drawable_canvas import st_canvas
3
  from huggingface_hub import HfFileSystem
4
  from flax.serialization import msgpack_restore, from_state_dict
5
 
@@ -18,28 +17,4 @@ print([(k, type(v)) for (k, v) in state.items()])
18
  # print(logits)
19
 
20
  # x = st.slider('Select a value')
21
- # st.write(x, 'squared is', x * x)
22
-
23
- def canvas_main():
24
- canvas_result = st_canvas(
25
- fill_color="rgba(255, 165, 0, 0.3)", # Fixed fill color with some opacity
26
- stroke_width=st.sidebar.slider("Brush width: ", 1, 100, 10),
27
- stroke_color=st.sidebar.color_picker("Enter brush color hex: "),
28
- background_color=st.sidebar.color_picker("Enter background color hex: ", "#eee"),
29
- background_image=None,
30
- update_streamlit=st.sidebar.checkbox("Update in realtime", True),
31
- height=150,
32
- drawing_mode=st.sidebar.checkbox("Drawing mode ?", True),
33
- point_display_radius=point_display_radius if st.sidebar.selectbox(
34
- "Drawing tool:",
35
- ("freedraw", "line", "rect", "circle", "transform", "polygon", "point"),
36
- ) == "point" else 0,
37
- display_toolbar=st.sidebar.checkbox("Display toolbar", True),
38
- key="canvas_main",
39
- )
40
-
41
- # Do something interesting with the image data and paths
42
- if canvas_result.image_data is not None:
43
- st.image(canvas_result.image_data)
44
-
45
- canvas_main()
 
1
  import streamlit as st
 
2
  from huggingface_hub import HfFileSystem
3
  from flax.serialization import msgpack_restore, from_state_dict
4
 
 
17
  # print(logits)
18
 
19
  # x = st.slider('Select a value')
20
+ # st.write(x, 'squared is', x * x)