Eraly-ml commited on
Commit
cf0a5d8
·
verified ·
1 Parent(s): 4aa3c8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -79,7 +79,7 @@ description = (
79
  "- PyTorch (Lightning)\n"
80
  "- Gradio\n"
81
  "- Hugging Face Spaces\n\n"
82
- "🔗 Source Code: [Hugging Face](https://huggingface.co/Eraly-ml/Skin-AI)"
83
  )
84
 
85
  # Adding example images
@@ -91,7 +91,7 @@ examples = [
91
  def update_submit_state(image):
92
  return gr.update(interactive=image is not None)
93
 
94
- with gr.Blocks(theme=gr.themes.Soft()) as interface:
95
  gr.Markdown(title)
96
  gr.Markdown(description)
97
 
@@ -105,6 +105,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as interface:
105
  submit_button.click(fn=predict, inputs=image_input, outputs=output_label)
106
 
107
  gr.Examples(examples, inputs=image_input)
108
-
 
109
  if __name__ == "__main__":
110
- interface.launch()
 
79
  "- PyTorch (Lightning)\n"
80
  "- Gradio\n"
81
  "- Hugging Face Spaces\n\n"
82
+ "🔗 Source Code: [Hugging Face](https://huggingface.co/Eraly-ml/Skin-AI )"
83
  )
84
 
85
  # Adding example images
 
91
  def update_submit_state(image):
92
  return gr.update(interactive=image is not None)
93
 
94
+ with gr.Blocks() as interface:
95
  gr.Markdown(title)
96
  gr.Markdown(description)
97
 
 
105
  submit_button.click(fn=predict, inputs=image_input, outputs=output_label)
106
 
107
  gr.Examples(examples, inputs=image_input)
108
+
109
+ # Для Docker/HF Spaces — указываем хост и порт явно
110
  if __name__ == "__main__":
111
+ interface.launch(server_name="0.0.0.0", server_port=7860)