Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ with gradio.Blocks() as demo:
|
|
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()
|
23 |
-
synthesize_it.click(fn=lambda x: synthesis_network.predict(numpy.fromstring(x, dtype=int)).tostring()
|
24 |
|
25 |
demo.launch()
|
|
|
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()
|