ccm commited on
Commit
5205c26
·
1 Parent(s): 3c4eca6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -17,8 +17,9 @@ with gradio.Blocks() as demo:
17
 
18
  analyze_it = gradio.Button("Analyze")
19
  synthesize_it = gradio.Button("Synthesize")
20
-
21
- analyze_it.click(fn=lambda x: numpy.array2string(analysis_network.predict(numpy.array(x))), inputs=[geometry], outputs=[spectrum], api_name="analyze")
22
- synthesize_it.click(fn=lambda x: numpy.array2string(synthesis_network.predict(numpy.array(x))), inputs=[spectrum], outputs=[geometry], api_name="synthesize")
 
23
 
24
  demo.launch()
 
17
 
18
  analyze_it = gradio.Button("Analyze")
19
  synthesize_it = gradio.Button("Synthesize")
20
+
21
+ numpy.fromstring(flattened_curves[0].tostring(), dtype=float)
22
+ analyze_it.click(fn=lambda x: analysis_network.predict(numpy.fromstring(x, dtype=float)).tostring()), inputs=[geometry], outputs=[spectrum], api_name="analyze")
23
+ synthesize_it.click(fn=lambda x: synthesis_network.predict(numpy.fromstring(x, dtype=int)).tostring()), inputs=[spectrum], outputs=[geometry], api_name="synthesize")
24
 
25
  demo.launch()