dreibh commited on
Commit
9cbe537
·
verified ·
1 Parent(s): 34a26dc

Yet another try.

Browse files
Files changed (2) hide show
  1. app.py +8 -8
  2. version.py +1 -1
app.py CHANGED
@@ -250,15 +250,15 @@ def analyze(request: gradio.Request) -> matplotlib.figure.Figure:
250
 
251
  leadI = data[0]
252
 
253
- # signals, info = neurokit2.ecg_process(leadI, sampling_rate = deepfakeecg.ECG_SAMPLING_RATE)
254
- # neurokit2.ecg_plot(signals, info)
255
 
256
  # DIN A4 landscape: w=11.7, h=8.27
257
  w = 508/25.4 # mm to inch
258
  h = 122/25.4 # mm to inch
259
- # matplotlib.pyplot.gcf().set_size_inches(w, h, forward=True)
260
 
261
- # return matplotlib.pyplot.gcf()
262
 
263
 
264
  # ###### Print usage and exit ###############################################
@@ -430,10 +430,10 @@ with gradio.Blocks() as gui:
430
  )
431
 
432
  # ====== Add click event handling for "Analyze" button ===================
433
- buttonAnalyze.click(analyze,
434
- inputs = [ ],
435
- outputs = [ analysisOutput ]
436
- )
437
 
438
  # ====== Add click event handling for download buttons ===================
439
  # Using hidden button and JavaScript, to generate download file on-the-fly:
 
250
 
251
  leadI = data[0]
252
 
253
+ signals, info = neurokit2.ecg_process(leadI, sampling_rate = deepfakeecg.ECG_SAMPLING_RATE)
254
+ neurokit2.ecg_plot(signals, info)
255
 
256
  # DIN A4 landscape: w=11.7, h=8.27
257
  w = 508/25.4 # mm to inch
258
  h = 122/25.4 # mm to inch
259
+ matplotlib.pyplot.gcf().set_size_inches(w, h, forward=True)
260
 
261
+ return matplotlib.pyplot.gcf()
262
 
263
 
264
  # ###### Print usage and exit ###############################################
 
430
  )
431
 
432
  # ====== Add click event handling for "Analyze" button ===================
433
+ # buttonAnalyze.click(analyze,
434
+ # inputs = [ ],
435
+ # outputs = [ analysisOutput ]
436
+ # )
437
 
438
  # ====== Add click event handling for download buttons ===================
439
  # Using hidden button and JavaScript, to generate download file on-the-fly:
version.py CHANGED
@@ -34,7 +34,7 @@
34
 
35
  DEEPFAKEECGGENPLUS_VERSION_MAJOR = 0
36
  DEEPFAKEECGGENPLUS_VERSION_MINOR = 5
37
- DEEPFAKEECGGENPLUS_VERSION_PATCH = "0~debug7"
38
  DEEPFAKEECGGENPLUS_VERSION = str(DEEPFAKEECGGENPLUS_VERSION_MAJOR) + '.' + \
39
  str(DEEPFAKEECGGENPLUS_VERSION_MINOR) + '.' + \
40
  str(DEEPFAKEECGGENPLUS_VERSION_PATCH)
 
34
 
35
  DEEPFAKEECGGENPLUS_VERSION_MAJOR = 0
36
  DEEPFAKEECGGENPLUS_VERSION_MINOR = 5
37
+ DEEPFAKEECGGENPLUS_VERSION_PATCH = "0~debug8"
38
  DEEPFAKEECGGENPLUS_VERSION = str(DEEPFAKEECGGENPLUS_VERSION_MAJOR) + '.' + \
39
  str(DEEPFAKEECGGENPLUS_VERSION_MINOR) + '.' + \
40
  str(DEEPFAKEECGGENPLUS_VERSION_PATCH)