Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
#!/usr/bin/env python
|
2 |
# encoding: utf-8
|
3 |
-
import spaces
|
4 |
import torch
|
5 |
import argparse
|
6 |
from transformers import AutoModel, AutoTokenizer
|
@@ -132,7 +132,7 @@ def create_multimodal_input(upload_image_disabled=False, upload_video_disabled=F
|
|
132 |
submit_button_props={'label': 'Submit'})
|
133 |
|
134 |
|
135 |
-
@spaces.GPU(duration=120)
|
136 |
def chat(img, msgs, ctx, params=None, vision_hidden_states=None):
|
137 |
try:
|
138 |
if msgs[-1]['role'] == 'assistant':
|
@@ -464,7 +464,7 @@ Click `How to use` tab to see examples.
|
|
464 |
"""
|
465 |
|
466 |
|
467 |
-
with gr.Blocks(css=css) as demo:
|
468 |
with gr.Tab(model_name):
|
469 |
with gr.Row():
|
470 |
with gr.Column(scale=1, min_width=300):
|
@@ -567,5 +567,4 @@ with gr.Blocks(css=css) as demo:
|
|
567 |
# launch
|
568 |
#demo.launch(share=False, debug=True, show_api=False, server_port=8885, server_name="0.0.0.0")
|
569 |
demo.queue()
|
570 |
-
demo.launch(show_api=False)
|
571 |
-
|
|
|
1 |
#!/usr/bin/env python
|
2 |
# encoding: utf-8
|
3 |
+
# import spaces
|
4 |
import torch
|
5 |
import argparse
|
6 |
from transformers import AutoModel, AutoTokenizer
|
|
|
132 |
submit_button_props={'label': 'Submit'})
|
133 |
|
134 |
|
135 |
+
# @spaces.GPU(duration=120)
|
136 |
def chat(img, msgs, ctx, params=None, vision_hidden_states=None):
|
137 |
try:
|
138 |
if msgs[-1]['role'] == 'assistant':
|
|
|
464 |
"""
|
465 |
|
466 |
|
467 |
+
with gr.Blocks(css=css, theme="Nymbo/Nymbo_Theme") as demo:
|
468 |
with gr.Tab(model_name):
|
469 |
with gr.Row():
|
470 |
with gr.Column(scale=1, min_width=300):
|
|
|
567 |
# launch
|
568 |
#demo.launch(share=False, debug=True, show_api=False, server_port=8885, server_name="0.0.0.0")
|
569 |
demo.queue()
|
570 |
+
demo.launch(show_api=False)
|
|