jiayong commited on
Commit
07046c5
·
1 Parent(s): 80d7c34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -12,6 +12,8 @@ oss_service = ossService()
12
 
13
  ENABLE_OSS_RESOURCES = False
14
 
 
 
15
  # result_video_oss_url = {} # user_id, (list[signed_url), list[oss_path])]
16
 
17
  def tab_func_template():
@@ -119,6 +121,7 @@ def get_user_result_video_list(uuid, date_string, num):
119
  return valid_video_list, valid_image_list
120
 
121
  def refresh_video(uuid, request_id):
 
122
  notes, process_status = myHumanGen.get_ranking_location(uuid)
123
  if is_wanx_platform:
124
  uuid = 'wanx_lab'
@@ -172,10 +175,12 @@ def refresh_video(uuid, request_id):
172
 
173
  return notes, new_list[0], new_list[1], new_list[2], new_list[3]#, new_image_list[0], new_image_list[1], new_image_list[2], new_image_list[3]
174
 
 
175
  def hello(profile: gr.OAuthProfile | None) -> str:
176
  if profile is None:
177
  return "I don't know you."
178
  # print(gr.OAuthProfile)
 
179
  print(f'profile name={profile.name}')
180
  return f"Hello {profile.name}"
181
 
@@ -190,6 +195,7 @@ with gr.Blocks(title = "Dreamoving",
190
  "# Gradio OAuth Space\n\nThis Space is a demo for the new **Sign in with Hugging Face** feature."
191
  )
192
  gr.LoginButton()
 
193
  m_text = gr.Markdown()
194
  demo.load(hello, inputs=None, outputs=m_text)
195
  with gr.Row():
@@ -246,12 +252,12 @@ with gr.Blocks(title = "Dreamoving",
246
  gr.Markdown("Select a mode: Reference-Video/Prompt")
247
 
248
  with gr.Tab("Guided Style Generation") as tab0:
249
- prompt_template = gr.Textbox(placeholder="Enter prompt words to control the generation effect, such as the character, the character's clothing, the scene, etc. Supports input in Chinese/English.",label="Prompt", lines=2,interactive=True,show_label=False, text_align='left')
250
  # with gr.Row():
251
  # # with gr.Group(elem_id='show_box3'):
252
  # # with gr.Group():
253
  # with gr.Column(scale=1, min_width=1):
254
- # prompt_template = gr.Textbox(placeholder="Enter prompt words to control the generation effect, such as the character, the character's clothing, the scene, etc. Supports input in Chinese/English.", label="Prompt提示词", lines=2,interactive=True,show_label=False, text_align='left')
255
  # with gr.Column(scale=1, min_width=1, elem_id='column_button'):
256
  # # prompt_caption_01 = gr.Button(value="AI Caption", elem_id='button_param1')
257
  # prompt_caption_01 = gr.Button(
 
12
 
13
  ENABLE_OSS_RESOURCES = False
14
 
15
+ profile_name = ''
16
+
17
  # result_video_oss_url = {} # user_id, (list[signed_url), list[oss_path])]
18
 
19
  def tab_func_template():
 
121
  return valid_video_list, valid_image_list
122
 
123
  def refresh_video(uuid, request_id):
124
+ print(f'profile_name={profile_name}')
125
  notes, process_status = myHumanGen.get_ranking_location(uuid)
126
  if is_wanx_platform:
127
  uuid = 'wanx_lab'
 
175
 
176
  return notes, new_list[0], new_list[1], new_list[2], new_list[3]#, new_image_list[0], new_image_list[1], new_image_list[2], new_image_list[3]
177
 
178
+
179
  def hello(profile: gr.OAuthProfile | None) -> str:
180
  if profile is None:
181
  return "I don't know you."
182
  # print(gr.OAuthProfile)
183
+ profile_name = profile.name
184
  print(f'profile name={profile.name}')
185
  return f"Hello {profile.name}"
186
 
 
195
  "# Gradio OAuth Space\n\nThis Space is a demo for the new **Sign in with Hugging Face** feature."
196
  )
197
  gr.LoginButton()
198
+ gr.LogoutButton()
199
  m_text = gr.Markdown()
200
  demo.load(hello, inputs=None, outputs=m_text)
201
  with gr.Row():
 
252
  gr.Markdown("Select a mode: Reference-Video/Prompt")
253
 
254
  with gr.Tab("Guided Style Generation") as tab0:
255
+ prompt_template = gr.Textbox(placeholder="Enter prompt words to control the generation effect, such as the character, the character's clothing, the scene, etc.",label="Prompt", lines=2,interactive=True,show_label=False, text_align='left')
256
  # with gr.Row():
257
  # # with gr.Group(elem_id='show_box3'):
258
  # # with gr.Group():
259
  # with gr.Column(scale=1, min_width=1):
260
+ # prompt_template = gr.Textbox(placeholder="Enter prompt words to control the generation effect, such as the character, the character's clothing, the scene, etc.", label="Prompt提示词", lines=2,interactive=True,show_label=False, text_align='left')
261
  # with gr.Column(scale=1, min_width=1, elem_id='column_button'):
262
  # # prompt_caption_01 = gr.Button(value="AI Caption", elem_id='button_param1')
263
  # prompt_caption_01 = gr.Button(