Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,11 @@ def classify_class(incident_description):
|
|
| 32 |
classification = response.choices[0].text.strip()
|
| 33 |
return classification
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
inputs = gr.inputs.Textbox(label="Flight Incident Description")
|
| 36 |
outputs = [gr.outputs.Textbox(label="Main Issue of the flight incident"),
|
| 37 |
gr.outputs.Textbox(label="category of the flight incident")]
|
|
|
|
| 32 |
classification = response.choices[0].text.strip()
|
| 33 |
return classification
|
| 34 |
|
| 35 |
+
def main(incident_description):
|
| 36 |
+
defect_class = classify_class(incident_description)
|
| 37 |
+
main_issue = classify_cause(incident_description)
|
| 38 |
+
return defect_class, main_issue
|
| 39 |
+
|
| 40 |
inputs = gr.inputs.Textbox(label="Flight Incident Description")
|
| 41 |
outputs = [gr.outputs.Textbox(label="Main Issue of the flight incident"),
|
| 42 |
gr.outputs.Textbox(label="category of the flight incident")]
|