minwoosun commited on
Commit
a14ec14
·
verified ·
1 Parent(s): 0a26430

test out new css

Browse files
Files changed (1) hide show
  1. app.py +34 -16
app.py CHANGED
@@ -128,22 +128,40 @@ def main(input_file_path, species):
128
 
129
  if __name__ == "__main__":
130
 
131
- # Define Gradio inputs and outputs
132
- file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
133
- species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
134
- image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
135
- file_output = gr.File(label="Download embeddings")
136
-
137
- # Create the Gradio interface
138
- demo = gr.Interface(
139
- fn=main,
140
- inputs=[file_input, species_input],
141
- outputs=[image_output, file_output],
142
- title="UCE 100M Demo",
143
- description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
144
- )
145
-
146
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
147
 
148
 
149
  # if __name__ == "__main__":
 
128
 
129
  if __name__ == "__main__":
130
 
131
+ css = """
132
+ body {background-color: black; color: white;}
133
+ .gradio-container {background-color: black; color: white;}
134
+ input, button, select, textarea {background-color: #333; color: white;}
135
+ """
136
+
137
+ with gr.Blocks(css=css) as demo:
138
+ gr.Markdown(
139
+ """
140
+ ### UCE 100M Demo
141
+
142
+ **Instructions:**
143
+ 1. Upload a `.h5ad` single cell gene expression file.
144
+ 2. Select the species (Human/Mouse).
145
+ 3. View the UMAP scatter plot and download the UMAP embeddings.
146
+ """
147
+ )
148
+
149
+ # Define Gradio inputs and outputs
150
+ file_input = gr.File(label="Upload a .h5ad single cell gene expression file")
151
+ species_input = gr.Dropdown(choices=["human", "mouse"], label="Select species")
152
+ image_output = gr.Image(type="numpy", label="UMAP of UCE Embeddings")
153
+ file_output = gr.File(label="Download embeddings")
154
+
155
+ # Create the Gradio interface
156
+ demo = gr.Interface(
157
+ fn=main,
158
+ inputs=[file_input, species_input],
159
+ outputs=[image_output, file_output],
160
+ title="UCE 100M Demo",
161
+ description="Upload a .h5ad single cell gene expression file, and get a UMAP scatter plot along with the UMAP coordinates in a CSV file."
162
+ )
163
+
164
+ demo.launch()
165
 
166
 
167
  # if __name__ == "__main__":