change cuda
Browse files
app.py
CHANGED
|
@@ -1212,9 +1212,9 @@ def upload_img(chatbot,t1c_ax_file, t1_file, t2_file, fla_file, text_input, chat
|
|
| 1212 |
img_list = []
|
| 1213 |
llm_message = chat.upload_img(files, chat_state, img_list)
|
| 1214 |
|
| 1215 |
-
instruction, LR_image_list
|
| 1216 |
# instruction, LR_image_list, HR_image_list, modalities = chat.encode_img(img_list, modalities)
|
| 1217 |
-
return chatbot, chat_state, instruction, LR_image_list, HR_image_list, modalities, gr.update(interactive=False),gr.update(interactive=False)
|
| 1218 |
|
| 1219 |
# t1c_ax_file, t1_file, t2_file, fla_file, t1c_file, text_input, chat_state, model_type
|
| 1220 |
def gradio_ask(user_message, age,gender,chatbot, chat_state,model_type):
|
|
|
|
| 1212 |
img_list = []
|
| 1213 |
llm_message = chat.upload_img(files, chat_state, img_list)
|
| 1214 |
|
| 1215 |
+
instruction, LR_image_list, HR_image_list, modalities = encode_img(img_list, modalities)
|
| 1216 |
# instruction, LR_image_list, HR_image_list, modalities = chat.encode_img(img_list, modalities)
|
| 1217 |
+
return chatbot, chat_state, instruction, LR_image_list.to('cuda'), HR_image_list.to('cuda'), modalities, gr.update(interactive=False),gr.update(interactive=False)
|
| 1218 |
|
| 1219 |
# t1c_ax_file, t1_file, t2_file, fla_file, t1c_file, text_input, chat_state, model_type
|
| 1220 |
def gradio_ask(user_message, age,gender,chatbot, chat_state,model_type):
|