Spaces:
Sleeping
Sleeping
github-actions[bot]
commited on
Commit
·
9ffa510
1
Parent(s):
8f6d6c3
Deploy from GitHub - 2026-01-21 03:57:35
Browse files- app.py +0 -15
- requirements.txt +1 -1
app.py
CHANGED
|
@@ -14,21 +14,6 @@ Based on Johnson et al. "Perceptual Losses for Real-Time Style Transfer"
|
|
| 14 |
https://arxiv.org/abs/1603.08155
|
| 15 |
"""
|
| 16 |
|
| 17 |
-
# Fix for gradio_client.cli module missing - MUST be before importing gradio
|
| 18 |
-
# Gradio 5.x installs an older gradio-client that doesn't have the cli module
|
| 19 |
-
# We upgrade gradio-client before importing gradio
|
| 20 |
-
import sys
|
| 21 |
-
import subprocess
|
| 22 |
-
try:
|
| 23 |
-
subprocess.check_call([sys.executable, "-m", "pip", "install", "--upgrade", "gradio-client>=1.10.0", "--quiet"])
|
| 24 |
-
except Exception:
|
| 25 |
-
pass # Best effort - if it fails, continue anyway
|
| 26 |
-
|
| 27 |
-
# Clear any cached gradio_client modules
|
| 28 |
-
for module in list(sys.modules.keys()):
|
| 29 |
-
if 'gradio' in module:
|
| 30 |
-
del sys.modules[module]
|
| 31 |
-
|
| 32 |
import gradio as gr
|
| 33 |
import torch
|
| 34 |
import torch.nn as nn
|
|
|
|
| 14 |
https://arxiv.org/abs/1603.08155
|
| 15 |
"""
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
import gradio as gr
|
| 18 |
import torch
|
| 19 |
import torch.nn as nn
|
requirements.txt
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
# Core dependencies for StyleForge Hugging Face Space
|
| 2 |
torch>=2.0.0
|
| 3 |
torchvision>=0.15.0
|
| 4 |
-
gradio
|
| 5 |
huggingface_hub>=0.23.0
|
| 6 |
spaces>=0.30.0
|
| 7 |
Pillow>=9.5.0
|
|
|
|
| 1 |
# Core dependencies for StyleForge Hugging Face Space
|
| 2 |
torch>=2.0.0
|
| 3 |
torchvision>=0.15.0
|
| 4 |
+
gradio==5.16.0
|
| 5 |
huggingface_hub>=0.23.0
|
| 6 |
spaces>=0.30.0
|
| 7 |
Pillow>=9.5.0
|