Praveen0309 commited on
Commit
d04a371
1 Parent(s): 67ecb5a
Files changed (2) hide show
  1. app.py +3 -3
  2. templates/index.html +1 -1
app.py CHANGED
@@ -26,8 +26,8 @@ peft_lora_adapter = PeftModel.from_pretrained(base_model, peft_lora_adapter_path
26
  base_model.load_adapter(peft_lora_adapter_path, adapter_name="lora_adapter")
27
 
28
  processor = AutoProcessor.from_pretrained("HuggingFaceH4/vsft-llava-1.5-7b-hf-trl")
29
- # model = M2M100ForConditionalGeneration.from_pretrained("facebook/m2m100_418M")
30
- # tokenizer = M2M100Tokenizer.from_pretrained("facebook/m2m100_418M")
31
 
32
 
33
  # model_id = r"C:\Users\prave\OneDrive\Desktop\MLOPS\Mlops_2\huggingface_model"
@@ -140,7 +140,7 @@ def get_bot_response():
140
  try:
141
  if 'image' in image_cache:
142
  image = image_cache['image']
143
- # print(image)
144
  query = request.args.get('msg')
145
  # output = query
146
  output = google_response(image, query)
 
26
  base_model.load_adapter(peft_lora_adapter_path, adapter_name="lora_adapter")
27
 
28
  processor = AutoProcessor.from_pretrained("HuggingFaceH4/vsft-llava-1.5-7b-hf-trl")
29
+ model = M2M100ForConditionalGeneration.from_pretrained("facebook/m2m100_418M")
30
+ tokenizer = M2M100Tokenizer.from_pretrained("facebook/m2m100_418M")
31
 
32
 
33
  # model_id = r"C:\Users\prave\OneDrive\Desktop\MLOPS\Mlops_2\huggingface_model"
 
140
  try:
141
  if 'image' in image_cache:
142
  image = image_cache['image']
143
+ print(image)
144
  query = request.args.get('msg')
145
  # output = query
146
  output = google_response(image, query)
templates/index.html CHANGED
@@ -27,7 +27,7 @@
27
  <div class="text">Send</div>
28
  </div>
29
  <form id="uploadForm" enctype="multipart/form-data" class="upload_wrapper">
30
- <input type="file" name="file" id="fileInput" accept=".jpg">
31
  <button type="submit">Upload</button>
32
  </form>
33
  <div id="uploadStatus"></div>
 
27
  <div class="text">Send</div>
28
  </div>
29
  <form id="uploadForm" enctype="multipart/form-data" class="upload_wrapper">
30
+ <input type="file" name="file" id="fileInput" accept=".png, .jpg, .jpeg">
31
  <button type="submit">Upload</button>
32
  </form>
33
  <div id="uploadStatus"></div>