peterpeter8585 commited on
Commit
d9ab2b2
1 Parent(s): 3e60930

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -12
app.py CHANGED
@@ -11,18 +11,8 @@ transformers.utils.move_cache()
11
  device = "cuda" if torch.cuda.is_available() else "cpu"
12
  import os
13
  password1=os.environ["password"]
14
- model_id = "peterpeter8585/ai2"
15
- gr.Interface(
16
- respond,
17
- inputs=[gr.MultimodalTextbox(file_types=["image"], show_label=False)],
18
- outputs="text",
19
- title="IDEFICS2-8B DPO",
20
- description="Try IDEFICS2-8B fine-tuned using direct preference optimization (DPO) in this demo. Learn more about vision language model DPO integration of TRL [here](https://huggingface.co/blog/dpo_vlm).",
21
- examples=[
22
- {"text": "What is the type of flower in the image and what insect is on it?", "files": ["./bee.jpg"]},
23
- {"text": "Describe the image", "files": ["./howl.jpg"]},
24
- ],
25
- ).launch()def respond1(
26
  message,
27
  history: list[tuple[str, str]],
28
  system_message,
 
11
  device = "cuda" if torch.cuda.is_available() else "cpu"
12
  import os
13
  password1=os.environ["password"]
14
+
15
+ def respond1(
 
 
 
 
 
 
 
 
 
 
16
  message,
17
  history: list[tuple[str, str]],
18
  system_message,