nahue-passano commited on
Commit
eb47a92
1 Parent(s): 358ef2a

fix: plots position

Browse files
Files changed (1) hide show
  1. app.py +21 -25
app.py CHANGED
@@ -51,31 +51,27 @@ def run_streamlit_app():
51
  analysis_length = st.text_input("Analysis length [ms]", value="500")
52
  intensity_threshold = st.text_input("Intensity threshold [dB]", value=-60)
53
 
54
- # "Analyze" button
55
- if st.button("Analyze", use_container_width=True):
56
- data = {
57
- "front_left_up": save_temp_file(audio_file_flu),
58
- "front_right_down": save_temp_file(audio_file_frd),
59
- "back_right_up": save_temp_file(audio_file_bru),
60
- "back_left_down": save_temp_file(audio_file_bld),
61
- "inverse_filter": save_temp_file(audio_file_inverse_filter),
62
- "input_mode": InputMode.LSS,
63
- "channels_per_file": 1,
64
- "frequency_correction": True,
65
- }
66
-
67
- analyzer = AmbisonicsImpulseResponseAnalyzer(
68
- int(integration_time),
69
- float(intensity_threshold),
70
- float(analysis_length),
71
- )
72
- fig = analyzer.analyze(data, show=False)
73
- fig.update_layout(height=1080)
74
- st.plotly_chart(fig, use_container_width=True, height=1080)
75
-
76
- # Generar un gráfico genérico con Plotly
77
- fig = go.Figure(data=go.Scatter(x=[1, 2, 3, 4], y=[10, 5, 7, 2]))
78
- st.plotly_chart(fig)
79
 
80
 
81
  if __name__ == "__main__":
 
51
  analysis_length = st.text_input("Analysis length [ms]", value="500")
52
  intensity_threshold = st.text_input("Intensity threshold [dB]", value=-60)
53
 
54
+ # "Analyze" button
55
+ if st.button("Analyze", use_container_width=True):
56
+ data = {
57
+ "front_left_up": save_temp_file(audio_file_flu),
58
+ "front_right_down": save_temp_file(audio_file_frd),
59
+ "back_right_up": save_temp_file(audio_file_bru),
60
+ "back_left_down": save_temp_file(audio_file_bld),
61
+ "inverse_filter": save_temp_file(audio_file_inverse_filter),
62
+ "input_mode": InputMode.LSS,
63
+ "channels_per_file": 1,
64
+ "frequency_correction": True,
65
+ }
66
+
67
+ analyzer = AmbisonicsImpulseResponseAnalyzer(
68
+ int(integration_time),
69
+ float(intensity_threshold),
70
+ float(analysis_length),
71
+ )
72
+ fig = analyzer.analyze(data, show=False)
73
+ fig.update_layout(height=1080)
74
+ st.plotly_chart(fig, use_container_width=True, height=1080)
 
 
 
 
75
 
76
 
77
  if __name__ == "__main__":