Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -211,8 +211,8 @@ print("🚀 Initializing ConceptAligner Demo")
|
|
| 211 |
print("="*60)
|
| 212 |
model = ConceptAlignerModel()
|
| 213 |
|
| 214 |
-
# Create Gradio interface
|
| 215 |
-
with gr.Blocks(title="ConceptAligner"
|
| 216 |
gr.Markdown("""
|
| 217 |
# 🎨 ConceptAligner Demo
|
| 218 |
|
|
@@ -263,4 +263,9 @@ with gr.Blocks(title="ConceptAligner", theme=gr.themes.Soft()) as demo:
|
|
| 263 |
reset_btn.click(fn=model.reset_history, outputs=[prev_image, current_image, prev_prompt_display])
|
| 264 |
|
| 265 |
if __name__ == "__main__":
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 211 |
print("="*60)
|
| 212 |
model = ConceptAlignerModel()
|
| 213 |
|
| 214 |
+
# Create Gradio interface (without theme in constructor for Gradio 6.0)
|
| 215 |
+
with gr.Blocks(title="ConceptAligner") as demo:
|
| 216 |
gr.Markdown("""
|
| 217 |
# 🎨 ConceptAligner Demo
|
| 218 |
|
|
|
|
| 263 |
reset_btn.click(fn=model.reset_history, outputs=[prev_image, current_image, prev_prompt_display])
|
| 264 |
|
| 265 |
if __name__ == "__main__":
|
| 266 |
+
# Launch with proper configuration for Hugging Face Spaces
|
| 267 |
+
demo.launch(
|
| 268 |
+
server_name="0.0.0.0",
|
| 269 |
+
server_port=7860,
|
| 270 |
+
show_error=True
|
| 271 |
+
)
|