rhit-leistemb commited on
Commit
02411bb
·
1 Parent(s): 9f37687

Tidied up things

Browse files
Files changed (2) hide show
  1. .gitattributes +1 -0
  2. app.py +4 -16
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ crop.gif filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -109,31 +109,19 @@ output = gr.Textbox(
109
  )
110
 
111
  # 5. Define custom CSS
112
- css = """
113
- body {
114
- background-image: url("https://picsum.photos/seed/picsum/200/300");
115
- }
116
- """
117
- gr.Interface(lambda x:x, "textbox", "textbox", css=css).launch(debug=True)
118
-
119
- # background-size: cover; /* Optional: Adjust how the image covers the background */
120
- # background-repeat: no-repeat; /* Optional: Prevent the image from repeating */
121
- # }
122
- # .gradio-container { /*Ensure the main container has the background */
123
- # min-height: 100vh;
124
- # }
125
 
126
  # 6. Create the gradio interface
127
- interface = gr.Interface(
128
  fn=prediction, # Function to process the image
129
  inputs=inputs, # Upload input
130
  outputs=output, # Display output
131
  title="Agriculture Ai",
132
  description="Predict crop yield based on a number of environmental and care metrics",
133
- css=css
134
  )
135
 
136
 
137
  # 7. Launch the app
138
  if __name__ == "__main__":
139
- interface.launch()
 
109
  )
110
 
111
  # 5. Define custom CSS
112
+ # Removed because this was a headache
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  # 6. Create the gradio interface
115
+ demo = gr.Interface(
116
  fn=prediction, # Function to process the image
117
  inputs=inputs, # Upload input
118
  outputs=output, # Display output
119
  title="Agriculture Ai",
120
  description="Predict crop yield based on a number of environmental and care metrics",
121
+ theme=gr.themes.Citrus()
122
  )
123
 
124
 
125
  # 7. Launch the app
126
  if __name__ == "__main__":
127
+ demo.launch()