rosemariafontana commited on
Commit
bc25bd7
·
verified ·
1 Parent(s): 23c7203

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -80,15 +80,16 @@ class Soil(BaseModel):
80
  class Yield(BaseModel):
81
  quantity: str = Field(..., title="Quantity", description="A description of the total yield (harvested amount) from this planting, including units when available")
82
  quality: str = Field(..., title="Quality", description="The product quality of the harvest. For example, small or large fruits, sweet or tart flavor, easily molding or containing mold, high number of product seconds, etc.")
83
-
 
84
  class Planting(BaseModel):
85
  name: str = Field(..., title="Name", description="The name of the planting")
86
  status: Status = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
87
  crop: List[str] = Field(..., title="Crop", description="A list of the crops in this planting")
88
  variety: List[str] = Field(..., title="Variety", description="A list of the crop varieties in this planting")
89
  logs: List[Log] = Field(..., title="Logs", description="A list of all the logs that are associated with the farm activities")
90
- soil: Soil = Field(..., title="Soil", description="A single soil profile for this planting, containing only one soil description")
91
- yield_: Yield = Field(..., title="Yield", description="One set of quantitative and qualitative yield observations for this planting")
92
 
93
  class FarmActivities(BaseModel):
94
  name: str = Field(..., title="Name", description="The name of the agricultural field.")
 
80
  class Yield(BaseModel):
81
  quantity: str = Field(..., title="Quantity", description="A description of the total yield (harvested amount) from this planting, including units when available")
82
  quality: str = Field(..., title="Quality", description="The product quality of the harvest. For example, small or large fruits, sweet or tart flavor, easily molding or containing mold, high number of product seconds, etc.")
83
+
84
+ # It breaks if soil and yield aren't lists for some reason
85
  class Planting(BaseModel):
86
  name: str = Field(..., title="Name", description="The name of the planting")
87
  status: Status = Field(..., title="Status", description="The status of the planting. \"active\" is a planting which is currently still in the field. \"archived\" is a planting which is no longer in the field (has been terminated or harvested)")
88
  crop: List[str] = Field(..., title="Crop", description="A list of the crops in this planting")
89
  variety: List[str] = Field(..., title="Variety", description="A list of the crop varieties in this planting")
90
  logs: List[Log] = Field(..., title="Logs", description="A list of all the logs that are associated with the farm activities")
91
+ soil: List[Soil] = Field(..., title="Soil", description="A single soil profile for this planting, containing only one soil description")
92
+ yield_: List[Yield] = Field(..., title="Yield", description="One set of quantitative and qualitative yield observations for this planting")
93
 
94
  class FarmActivities(BaseModel):
95
  name: str = Field(..., title="Name", description="The name of the agricultural field.")