AmirMoris commited on
Commit
d1c6074
·
1 Parent(s): 34ff48f

Feat: Toggle theme

Browse files
.idea/.gitignore ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ # Default ignored files
2
+ /shelf/
3
+ /workspace.xml
4
+ # Editor-based HTTP Client requests
5
+ /httpRequests/
6
+ # Datasource local storage ignored files
7
+ /dataSources/
8
+ /dataSources.local.xml
.idea/Text_Driven_Image_to_Image_Generation.iml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
4
+ <output url="file://$PROJECT_DIR$/out" />
5
+ </component>
6
+ </project>
.idea/modules.xml ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/Text_Driven_Image_to_Image_Generation.iml" filepath="$PROJECT_DIR$/.idea/Text_Driven_Image_to_Image_Generation.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
.idea/vcs.xml ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ </component>
6
+ </project>
app.py CHANGED
@@ -79,7 +79,8 @@ def reset_button_clicked():
79
 
80
 
81
  def main():
82
- with gr.Blocks(css="footer {visibility: hidden}") as demo:
 
83
  with gr.Row():
84
  input_image = gr.Image(label="Input Image", type="pil", interactive=True)
85
  edited_image = gr.Image(
@@ -149,6 +150,15 @@ def main():
149
  edited_image
150
  ],
151
  )
 
 
 
 
 
 
 
 
 
152
 
153
  # Launch Gradio interface
154
 
 
79
 
80
 
81
  def main():
82
+ with gr.Blocks(theme="AmirMoris/GP_Themes") as demo:
83
+ toggle_theme = gr.Button(value="Toggle Theme")
84
  with gr.Row():
85
  input_image = gr.Image(label="Input Image", type="pil", interactive=True)
86
  edited_image = gr.Image(
 
150
  edited_image
151
  ],
152
  )
153
+ toggle_theme.click(
154
+ None,
155
+ js=
156
+ """
157
+ () => {
158
+ document.body.classList.toggle('dark');
159
+ }
160
+ """,
161
+ )
162
 
163
  # Launch Gradio interface
164