joheras commited on
Commit
624e1b2
·
1 Parent(s): d934255
Files changed (2) hide show
  1. app.py +3 -3
  2. examples/sample.csv → sample.csv +0 -0
app.py CHANGED
@@ -6,8 +6,8 @@ import numpy as np
6
 
7
  model = from_pretrained_keras("keras-io/timeseries_transformer_classification")
8
 
9
- def detect_issue(df):
10
- df = pd.read_csv('sample.csv',header=None)
11
  pred = model.predict(df)[0]
12
  problem = 'No problem'
13
  if(np.argmax(pred)==1):
@@ -18,7 +18,7 @@ def detect_issue(df):
18
  iface = gr.Interface(detect_issue,"dataframe",outputs=[
19
  gr.outputs.Textbox(label="Engine issue"),
20
  gr.outputs.Textbox(label="Engine issue score")],
21
- examples = ["examples/sample.csv"]
22
  )
23
 
24
 
 
6
 
7
  model = from_pretrained_keras("keras-io/timeseries_transformer_classification")
8
 
9
+ def detect_issue(csvFile):
10
+ df = pd.read_csv(csvFile,header=None)
11
  pred = model.predict(df)[0]
12
  problem = 'No problem'
13
  if(np.argmax(pred)==1):
 
18
  iface = gr.Interface(detect_issue,"dataframe",outputs=[
19
  gr.outputs.Textbox(label="Engine issue"),
20
  gr.outputs.Textbox(label="Engine issue score")],
21
+ examples = ["sample.csv"],
22
  )
23
 
24
 
examples/sample.csv → sample.csv RENAMED
File without changes