Spaces:
Build error
Build error
Update app_dialogue.py
Browse files- app_dialogue.py +19 -19
app_dialogue.py
CHANGED
@@ -554,25 +554,25 @@ def model_generation(
|
|
554 |
|
555 |
return generated_text
|
556 |
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
|
577 |
dope_callback = gr.CSVLogger()
|
578 |
dope_hf_callback = gr.HuggingFaceDatasetSaver(
|
|
|
554 |
|
555 |
return generated_text
|
556 |
|
557 |
+
def process_example(message, image):
|
558 |
+
print("********* process_example **********")
|
559 |
+
clear_msg, image_value, chat = model_inference(
|
560 |
+
user_prompt_str=message,
|
561 |
+
chat_history=[],
|
562 |
+
image=image,
|
563 |
+
decoding_strategy="Greedy",
|
564 |
+
num_beams=None,
|
565 |
+
temperature=None,
|
566 |
+
no_repeat_ngram_size=None,
|
567 |
+
max_new_tokens=512,
|
568 |
+
min_length=16,
|
569 |
+
repetition_penalty=None,
|
570 |
+
length_penalty=None,
|
571 |
+
top_k=None,
|
572 |
+
top_p=0.95,
|
573 |
+
penalty_alpha=None,
|
574 |
+
)
|
575 |
+
return clear_msg, image_value, chat
|
576 |
|
577 |
dope_callback = gr.CSVLogger()
|
578 |
dope_hf_callback = gr.HuggingFaceDatasetSaver(
|