ikraamkb commited on
Commit
38eba8d
·
verified ·
1 Parent(s): 50e9e95

Update Visualisation/app.py

Browse files
Files changed (1) hide show
  1. Visualisation/app.py +1 -5
Visualisation/app.py CHANGED
@@ -11,8 +11,6 @@ table_analyzer = pipeline("table-question-answering", model="google/tapas-base")
11
 
12
  user_input_processor = pipeline("text-generation", model="tiiuae/falcon-7b-instruct",torch_dtype=torch.float16)
13
 
14
- image_captioner = pipeline("image-to-text", model="Salesforce/blip2-opt-2.7b",torch_dtype=torch.float16 )
15
-
16
  # ✅ Load T5 Model (ensure correct architecture)
17
  model_name = "google/t5-small" # Change to the correct T5 model if needed
18
  tokenizer = AutoTokenizer.from_pretrained(model_name)
@@ -76,8 +74,6 @@ async def visualize(
76
  img_stream.seek(0)
77
  plt.close()
78
 
79
- # Generate image caption
80
- image_description = image_captioner(img_stream)
81
- print("🖼️ Description du graphique:", image_description)
82
 
83
  return StreamingResponse(img_stream, media_type="image/png")
 
11
 
12
  user_input_processor = pipeline("text-generation", model="tiiuae/falcon-7b-instruct",torch_dtype=torch.float16)
13
 
 
 
14
  # ✅ Load T5 Model (ensure correct architecture)
15
  model_name = "google/t5-small" # Change to the correct T5 model if needed
16
  tokenizer = AutoTokenizer.from_pretrained(model_name)
 
74
  img_stream.seek(0)
75
  plt.close()
76
 
77
+
 
 
78
 
79
  return StreamingResponse(img_stream, media_type="image/png")