kadirnar commited on
Commit
1b5e7f2
1 Parent(s): dca7bd3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -27
app.py CHANGED
@@ -3,32 +3,8 @@ from tuneavideo.models.unet import UNet3DConditionModel
3
  from tuneavideo.util import save_videos_grid
4
  import torch
5
  import gradio as gr
6
- from bs4 import BeautifulSoup
7
- import requests
8
 
9
-
10
- def model_url_list():
11
- url_list = []
12
- for i in range(0, 5):
13
- url_list.append(f"https://huggingface.co/models?p={i}&sort=downloads&search=dreambooth")
14
- return url_list
15
-
16
- def data_scraping(url_list):
17
- model_list = []
18
- for url in url_list:
19
- response = requests.get(url)
20
- soup = BeautifulSoup(response.text, "html.parser")
21
- div_class = 'grid grid-cols-1 gap-5 2xl:grid-cols-2'
22
- div = soup.find('div', {'class': div_class})
23
- for a in div.find_all('a', href=True):
24
- model_list.append(a['href'])
25
- return model_list
26
-
27
- model_list = data_scraping(model_url_list())
28
- for i in range(len(model_list)):
29
- model_list[i] = model_list[i][1:]
30
-
31
- best_model_list = [
32
  "runwayml/stable-diffusion-v1-5",
33
  "CompVis/stable-diffusion-v1-4",
34
  "prompthero/openjourney",
@@ -36,8 +12,6 @@ best_model_list = [
36
  "dreamlike-art/dreamlike-diffusion-1.0"
37
  ]
38
 
39
- model_list = best_model_list + model_list
40
-
41
  def tune_video_predict(
42
  pipe_id: str,
43
  prompt: str,
 
3
  from tuneavideo.util import save_videos_grid
4
  import torch
5
  import gradio as gr
 
 
6
 
7
+ model_list = [
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  "runwayml/stable-diffusion-v1-5",
9
  "CompVis/stable-diffusion-v1-4",
10
  "prompthero/openjourney",
 
12
  "dreamlike-art/dreamlike-diffusion-1.0"
13
  ]
14
 
 
 
15
  def tune_video_predict(
16
  pipe_id: str,
17
  prompt: str,