chansung commited on
Commit
472a4b5
1 Parent(s): 7747319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import spaces
2
- import gradio as gr
3
 
4
  from vid2persona import init
5
  from vid2persona.pipeline import vlm
@@ -27,7 +27,7 @@ async def extract_traits(video_path):
27
  gr.Button(interactive=True)
28
  ]
29
 
30
- @spaces.GPU
31
  async def conversation(
32
  message: str, messages: list, traits: dict,
33
  model_id: str, max_input_token_length: int,
@@ -42,7 +42,7 @@ async def conversation(
42
  prompt_tpl_path, model_id,
43
  max_input_token_length, max_new_tokens,
44
  temperature, top_p, top_k,
45
- repetition_penalty, hf_token=None#init.hf_access_token
46
  ):
47
  last_message = messages[-1]
48
  last_message[1] = last_message[1] + partial_response
@@ -69,7 +69,7 @@ async def regen_conversation(
69
  prompt_tpl_path, model_id,
70
  max_input_token_length, max_new_tokens,
71
  temperature, top_p, top_k,
72
- repetition_penalty, hf_token=None#init.hf_access_token
73
  ):
74
  last_message = messages[-1]
75
  last_message[1] = last_message[1] + partial_response
 
1
  import spaces
2
+ # import gradio as gr
3
 
4
  from vid2persona import init
5
  from vid2persona.pipeline import vlm
 
27
  gr.Button(interactive=True)
28
  ]
29
 
30
+ # @spaces.GPU
31
  async def conversation(
32
  message: str, messages: list, traits: dict,
33
  model_id: str, max_input_token_length: int,
 
42
  prompt_tpl_path, model_id,
43
  max_input_token_length, max_new_tokens,
44
  temperature, top_p, top_k,
45
+ repetition_penalty, hf_token=init.hf_access_token
46
  ):
47
  last_message = messages[-1]
48
  last_message[1] = last_message[1] + partial_response
 
69
  prompt_tpl_path, model_id,
70
  max_input_token_length, max_new_tokens,
71
  temperature, top_p, top_k,
72
+ repetition_penalty, hf_token=init.hf_access_token
73
  ):
74
  last_message = messages[-1]
75
  last_message[1] = last_message[1] + partial_response