Update app.py
Browse files
app.py
CHANGED
@@ -3,13 +3,15 @@ import math
|
|
3 |
import time
|
4 |
import numpy
|
5 |
import random
|
|
|
6 |
import threading
|
7 |
import gradio as gr
|
8 |
from PIL import Image, ImageOps
|
9 |
from moviepy import VideoFileClip
|
10 |
from datetime import datetime, timedelta
|
11 |
-
from huggingface_hub import hf_hub_download, snapshot_download
|
12 |
-
|
|
|
13 |
import insightface
|
14 |
from insightface.app import FaceAnalysis
|
15 |
from facexlib.parsing import init_parsing_model
|
@@ -331,7 +333,7 @@ with gr.Blocks() as demo:
|
|
331 |
latents, seed = infer(
|
332 |
prompt,
|
333 |
image_input,
|
334 |
-
num_inference_steps=
|
335 |
guidance_scale=7.0,
|
336 |
seed=seed_value,
|
337 |
progress=progress,
|
|
|
3 |
import time
|
4 |
import numpy
|
5 |
import random
|
6 |
+
import spaces
|
7 |
import threading
|
8 |
import gradio as gr
|
9 |
from PIL import Image, ImageOps
|
10 |
from moviepy import VideoFileClip
|
11 |
from datetime import datetime, timedelta
|
12 |
+
from huggingface_hub import hf_hub_download, snapshot_download, login
|
13 |
+
HF_TOKEN=os.environ.get('HF_TOKEN')
|
14 |
+
login(token=HF_TOKEN)
|
15 |
import insightface
|
16 |
from insightface.app import FaceAnalysis
|
17 |
from facexlib.parsing import init_parsing_model
|
|
|
333 |
latents, seed = infer(
|
334 |
prompt,
|
335 |
image_input,
|
336 |
+
num_inference_steps=5,
|
337 |
guidance_scale=7.0,
|
338 |
seed=seed_value,
|
339 |
progress=progress,
|