Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,19 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
-
|
5 |
import cv2
|
6 |
|
7 |
# Clone le repo si non présent
|
8 |
if not os.path.exists('TCVC-Temporally-Consistent-Video-Colorization'):
|
9 |
os.system('git clone https://github.com/lyh-18/TCVC-Temporally-Consistent-Video-Colorization.git')
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
# Charger le modèle pré-entraîné
|
12 |
def load_model():
|
13 |
model = TCVC_Model()
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
import os
|
4 |
+
import sys
|
5 |
import cv2
|
6 |
|
7 |
# Clone le repo si non présent
|
8 |
if not os.path.exists('TCVC-Temporally-Consistent-Video-Colorization'):
|
9 |
os.system('git clone https://github.com/lyh-18/TCVC-Temporally-Consistent-Video-Colorization.git')
|
10 |
|
11 |
+
# Ajouter le dépôt cloné au chemin Python
|
12 |
+
sys.path.append('TCVC-Temporally-Consistent-Video-Colorization')
|
13 |
+
|
14 |
+
# Importer le modèle depuis le dépôt cloné
|
15 |
+
from models.TCVC import TCVC_Model
|
16 |
+
|
17 |
# Charger le modèle pré-entraîné
|
18 |
def load_model():
|
19 |
model = TCVC_Model()
|