Jimmyzheng-10 commited on
Commit
c1e9df5
·
1 Parent(s): cf20a8c

Simplify Gradio configuration to resolve persistent 'Content unavailable' error

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -40,7 +40,7 @@ examples_data = [
40
  ],
41
  ]
42
 
43
- TAILWIND_SCRIPT = "<script src='https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4'></script>"
44
 
45
  def image_to_data_url(image_path):
46
  """Convert an image file to a data URL for embedding in HTML."""
@@ -240,7 +240,7 @@ def process_and_generate(image_np, image_path_from_state, sidebar_prompt, header
240
 
241
  return initial_preview, html_content, gr.update(value=package_url, visible=True)
242
 
243
- with gr.Blocks(head=TAILWIND_SCRIPT, theme=gr.themes.Default()) as demo:
244
  gr.Markdown("# ScreenCoder: Screenshot to Code")
245
  with gr.Row():
246
  with gr.Column(scale=1):
@@ -336,8 +336,7 @@ for path in allowed_paths:
336
  if __name__ == "__main__":
337
  demo.launch(
338
  allowed_paths=allowed_paths,
339
- show_error=True,
340
- quiet=False,
341
- favicon_path=None,
342
- prevent_thread_lock=True
343
  )
 
40
  ],
41
  ]
42
 
43
+ # TAILWIND_SCRIPT = "<script src='https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4'></script>"
44
 
45
  def image_to_data_url(image_path):
46
  """Convert an image file to a data URL for embedding in HTML."""
 
240
 
241
  return initial_preview, html_content, gr.update(value=package_url, visible=True)
242
 
243
+ with gr.Blocks() as demo:
244
  gr.Markdown("# ScreenCoder: Screenshot to Code")
245
  with gr.Row():
246
  with gr.Column(scale=1):
 
336
  if __name__ == "__main__":
337
  demo.launch(
338
  allowed_paths=allowed_paths,
339
+ server_name="0.0.0.0",
340
+ server_port=7860,
341
+ share=False
 
342
  )