nroggendorff commited on
Commit
4d22503
1 Parent(s): 65c8863

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -3
app.py CHANGED
@@ -9,7 +9,6 @@ from transformers import TextIteratorStreamer
9
 
10
  import spaces
11
 
12
-
13
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
14
 
15
  processor = AutoProcessor.from_pretrained(model_id)
@@ -23,7 +22,6 @@ model = LlavaForConditionalGeneration.from_pretrained(
23
  model.to("cuda:0")
24
  model.generation_config.eos_token_id = 128009
25
 
26
-
27
  @spaces.GPU
28
  def bot_streaming(message, history):
29
  print(message)
@@ -65,7 +63,6 @@ def bot_streaming(message, history):
65
  time.sleep(0.06)
66
  yield generated_text_without_prompt
67
 
68
-
69
  chatbot=gr.Chatbot(scale=1)
70
  chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter message or upload file...", show_label=False)
71
  with gr.Blocks(fill_height=True, ) as demo:
 
9
 
10
  import spaces
11
 
 
12
  model_id = "xtuner/llava-llama-3-8b-v1_1-transformers"
13
 
14
  processor = AutoProcessor.from_pretrained(model_id)
 
22
  model.to("cuda:0")
23
  model.generation_config.eos_token_id = 128009
24
 
 
25
  @spaces.GPU
26
  def bot_streaming(message, history):
27
  print(message)
 
63
  time.sleep(0.06)
64
  yield generated_text_without_prompt
65
 
 
66
  chatbot=gr.Chatbot(scale=1)
67
  chat_input = gr.MultimodalTextbox(interactive=True, file_types=["image"], placeholder="Enter message or upload file...", show_label=False)
68
  with gr.Blocks(fill_height=True, ) as demo: