prithivMLmods commited on
Commit
697d69f
·
verified ·
1 Parent(s): 9a29949

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -20
app.py CHANGED
@@ -9,9 +9,16 @@ import spaces
9
  import torch
10
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
11
 
12
- DESCRIPTIONx = """## STABLE HAMSTER
 
 
 
 
 
 
13
  """
14
 
 
15
  # Use environment variables for flexibility
16
  MODEL_ID = os.getenv("MODEL_REPO")
17
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
@@ -112,24 +119,7 @@ footer {
112
  }
113
  '''
114
 
115
- loading_html = """
116
- <div id="loading" style="display: flex; justify-content: center; align-items: center; height: 100vh;">
117
- <iframe src="https://prithivmlmods-hamster-static.static.hf.space/index.html" style="border: none; width: 100%; height: 100%;"></iframe>
118
- </div>
119
- <div id="app" style="display: none;">
120
- """
121
-
122
- loading_js = """
123
- <script>
124
- setTimeout(() => {
125
- document.getElementById('loading').style.display = 'none';
126
- document.getElementById('app').style.display = 'block';
127
- }, 5000); // 5000 milliseconds = 5 seconds
128
- </script>
129
- """
130
-
131
  with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
132
- gr.HTML(loading_html)
133
  gr.Markdown(DESCRIPTIONx)
134
  with gr.Group():
135
  with gr.Row():
@@ -235,7 +225,5 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
235
  api_name="run",
236
  )
237
 
238
- gr.HTML(loading_js)
239
-
240
  if __name__ == "__main__":
241
  demo.queue(max_size=50).launch()
 
9
  import torch
10
  from diffusers import StableDiffusionXLPipeline, EulerAncestralDiscreteScheduler
11
 
12
+
13
+ DESCRIPTIONx = """
14
+ <div style="text-align:center">
15
+ <iframe src="https://prithivmlmods-hamster-static.static.hf.space/index.html" width="560" height="315" frameborder="0" allowfullscreen></iframe>
16
+ </div>
17
+
18
+ ## STABLE HAMSTER
19
  """
20
 
21
+
22
  # Use environment variables for flexibility
23
  MODEL_ID = os.getenv("MODEL_REPO")
24
  MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
 
119
  }
120
  '''
121
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
122
  with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
 
123
  gr.Markdown(DESCRIPTIONx)
124
  with gr.Group():
125
  with gr.Row():
 
225
  api_name="run",
226
  )
227
 
 
 
228
  if __name__ == "__main__":
229
  demo.queue(max_size=50).launch()