MeYourHint commited on
Commit
b91097e
·
1 Parent(s): 413244f
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -63,7 +63,7 @@ EXAMPLES = [
63
  # css to make videos look nice
64
  # var(--block-border-color); TODO
65
  CSS = """
66
- .retrieved_video {
67
  position: relative;
68
  margin: 0;
69
  box-shadow: var(--block-shadow);
@@ -89,10 +89,10 @@ def generate(
89
  motion_length = int(file_name.split('len')[-1].replace('_ik.mp4', ''))
90
  for n in range(repeat_times):
91
  data_unit = {
92
- "url": f"./generation/{uid}/animations/0/sample0_repeat{n}_len{motion_length}_ik.mp4"
93
  }
94
  datas.append(data_unit)
95
- print(datas)
96
  return datas
97
 
98
 
@@ -103,9 +103,9 @@ def get_video_html(data, video_id, width=700, height=700):
103
  # <div class="contour_video" style="position: absolute; padding: 10px;">
104
  # width="{width}" height="{height}"
105
  video_html = f"""
106
- <video class="retrieved_video" width="{width}" height="{height}" preload="auto" muted playsinline onpause="this.load()"
107
  autoplay loop disablepictureinpicture id="{video_id}">
108
- <source src="{url}" type="video/mp4">
109
  Your browser does not support the video tag.
110
  </video>
111
  """
 
63
  # css to make videos look nice
64
  # var(--block-border-color); TODO
65
  CSS = """
66
+ .generate_video {
67
  position: relative;
68
  margin: 0;
69
  box-shadow: var(--block-shadow);
 
89
  motion_length = int(file_name.split('len')[-1].replace('_ik.mp4', ''))
90
  for n in range(repeat_times):
91
  data_unit = {
92
+ "url": f"generation/{uid}/animations/0/sample0_repeat{n}_len{motion_length}_ik.mp4"
93
  }
94
  datas.append(data_unit)
95
+ print(datas)
96
  return datas
97
 
98
 
 
103
  # <div class="contour_video" style="position: absolute; padding: 10px;">
104
  # width="{width}" height="{height}"
105
  video_html = f"""
106
+ <video class="generate_video" width="{width}" height="{height}" preload="auto" muted playsinline onpause="this.load()"
107
  autoplay loop disablepictureinpicture id="{video_id}">
108
+ <source src="file/{url}" type="video/mp4">
109
  Your browser does not support the video tag.
110
  </video>
111
  """