ccm commited on
Commit
c0a0037
1 Parent(s): b8fc23d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -0
main.py CHANGED
@@ -72,6 +72,7 @@ with gradio.Blocks() as demo:
72
  gradio.Markdown("It can be challenging to rapidly infer the stress and strain that are present in a material with a complex microstructure. This demo runs a rapid surrogate model to compute strain for the microstructure that you draw!")
73
 
74
  mask = gradio.Image(image_mode="L", source="canvas", label="microstructure")
 
75
 
76
  btn = gradio.Button("Run!", variant="primary")
77
  exx = gradio.Image(label="ε-xx")
 
72
  gradio.Markdown("It can be challenging to rapidly infer the stress and strain that are present in a material with a complex microstructure. This demo runs a rapid surrogate model to compute strain for the microstructure that you draw!")
73
 
74
  mask = gradio.Image(image_mode="L", source="canvas", label="microstructure")
75
+ mask.update(fn=predict, inputs=[mask], outputs=[exx, eyy, exy, legend])
76
 
77
  btn = gradio.Button("Run!", variant="primary")
78
  exx = gradio.Image(label="ε-xx")