Spaces:
Runtime error
Runtime error
app
Browse files- app.py +3 -3
- 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(
|
10 |
-
df = pd.read_csv(
|
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 = ["
|
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
|