varshakolanu commited on
Commit
4be1817
·
verified ·
1 Parent(s): 2f6aa44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -151,22 +151,22 @@ def predict_vendor_score(*args: Any) -> Dict[str, Any]:
151
  iface = gr.Interface(
152
  fn=predict_vendor_score,
153
  inputs=[
154
- gr.inputs.Textbox(label="Quality Report (Long Text)", type="text"), # Consistent
155
- gr.inputs.Number(label="Delay Days (Number)"),
156
- gr.inputs.Textbox(label="Incident Log (Long Text)", type="text"),
157
- gr.inputs.Textbox(label="Vendor ID (Text)"), # Send ID
158
- gr.inputs.Textbox(label="Work Details (Long Text)", type="text"),
159
- gr.inputs.Datetime(label="Work Completion Date"),
160
- gr.inputs.Datetime(label="Actual Completion Date"),
161
- ],
162
- outputs=[
163
- gr.outputs.HighlightedText(label="Quality Score (%)"),
164
- gr.outputs.HighlightedText(label="Timeliness Score (%)"),
165
- gr.outputs.HighlightedText(label="Safety Score (%)"),
166
- gr.outputs.HighlightedText(label="Communication Score (%)"),
167
- gr.outputs.HighlightedText(label="Final Score (%)"),
168
- #gr.outputs.File(label = "Download PDF") # removed file
169
  ],
 
 
 
 
 
 
 
 
170
  title="Subcontractor Performance Score Calculator",
171
  description="Enter Vendor Log details to calculate performance scores.",
172
  )
 
151
  iface = gr.Interface(
152
  fn=predict_vendor_score,
153
  inputs=[
154
+ gr.Textbox(label="Quality Report (Long Text)", type="text"), # Consistent
155
+ gr.Number(label="Delay Days (Number)"),
156
+ gr.Textbox(label="Incident Log (Long Text)", type="text"),
157
+ gr.Textbox(label="Vendor ID (Text)"), # Send ID
158
+ gr.Textbox(label="Work Details (Long Text)", type="text"),
159
+ gr.Datetime(label="Work Completion Date"),
160
+ gr.Datetime(label="Actual Completion Date"),
 
 
 
 
 
 
 
 
161
  ],
162
+ outputs={
163
+ "Quality_Score__c": gr.HighlightedText(label="Quality Score (%)"),
164
+ "Timeliness_Score__c": gr.HighlightedText(label="Timeliness Score (%)"),
165
+ "Safety_Score__c": gr.HighlightedText(label="Safety Score (%)"),
166
+ "Communication_Score__c": gr.HighlightedText(label="Communication Score (%)"),
167
+ "Final_Score_c": gr.HighlightedText(label="Final Score (%)"),
168
+ # "Download_PDF": gr.File(label="Download PDF"), # removed file
169
+ },
170
  title="Subcontractor Performance Score Calculator",
171
  description="Enter Vendor Log details to calculate performance scores.",
172
  )