Praveen0309 commited on
Commit
3492cf8
1 Parent(s): 28840c0

final_commit

Browse files
__pycache__/main.cpython-39.pyc CHANGED
Binary files a/__pycache__/main.cpython-39.pyc and b/__pycache__/main.cpython-39.pyc differ
 
main.py CHANGED
@@ -143,13 +143,14 @@ async def upload_file(file: UploadFile = File(...)):
143
  # Store the image in cache (replace with a more suitable storage approach)
144
  image_cache['image'] = image
145
  # print("Processing complete. Image stored in cache.")
146
- return JSONResponse(content={'status': 'success'})
147
  else:
148
  # print("dfsd")
149
- return JSONResponse(content={'status': 'error', 'message': 'Uploaded file is not a jpg image.'})
150
  except Exception as e:
151
- print(e)
152
- return JSONResponse(content={'status': 'error', 'message': str(e)})
 
153
 
154
 
155
 
@@ -182,7 +183,7 @@ async def get_items(msg: str):
182
  return output
183
  else:
184
  # return msg
185
- return "Please upload an image to continue"
186
  except Exception as e:
187
  return f"Error: {str(e)}"
188
 
 
143
  # Store the image in cache (replace with a more suitable storage approach)
144
  image_cache['image'] = image
145
  # print("Processing complete. Image stored in cache.")
146
+ return JSONResponse(content={'status': 'সাফল্য'})
147
  else:
148
  # print("dfsd")
149
+ return JSONResponse(content={'status': 'ত্রুটি', 'message': 'আপলোড করা ফাইলটি একটি jpg ছবি নয়।'})
150
  except Exception as e:
151
+ # print(e)
152
+ msg = deep_translator_en_bn(str(e))
153
+ return JSONResponse(content={'status': 'ত্রুটি', 'message': msg})
154
 
155
 
156
 
 
183
  return output
184
  else:
185
  # return msg
186
+ return "চালিয়ে যেতে একটি ছবি আপলোড করুন"
187
  except Exception as e:
188
  return f"Error: {str(e)}"
189
 
static/index.html CHANGED
@@ -9,18 +9,18 @@
9
  </head>
10
  <body>
11
  <div class="container">
12
- <h1>Welcome to the chat world</h1>
13
  </div>
14
 
15
  <div class="chat_window">
16
  <div class="top_menu">
17
- <div class="title">Chat With Your Document</div>
18
  </div>
19
  <ul class="messages"></ul>
20
 
21
  <div class="bottom_wrapper clearfix">
22
  <div class="message_input_wrapper">
23
- <input class="message_input" placeholder="Type your message here..." />
24
  </div>
25
  <div class="send_message">
26
  <div class="icon"></div>
 
9
  </head>
10
  <body>
11
  <div class="container">
12
+ <h1>চ্যাট জগতে স্বাগতম</h1>
13
  </div>
14
 
15
  <div class="chat_window">
16
  <div class="top_menu">
17
+ <div class="title">আপনার ইমেজ সঙ্গে চ্যাট</div>
18
  </div>
19
  <ul class="messages"></ul>
20
 
21
  <div class="bottom_wrapper clearfix">
22
  <div class="message_input_wrapper">
23
+ <input class="message_input" placeholder="এখানে আপনার বার্তা টাইপ করুন..." />
24
  </div>
25
  <div class="send_message">
26
  <div class="icon"></div>
static/script.js CHANGED
@@ -88,7 +88,7 @@ $(document).ready(function(){
88
 
89
  // Add initial bot message
90
  var initialBotMessage = new Message({
91
- text: 'How can I help you?',
92
  message_side: 'bot'
93
  });
94
  initialBotMessage.draw();
 
88
 
89
  // Add initial bot message
90
  var initialBotMessage = new Message({
91
+ text: 'চালিয়ে যেতে একটি ছবি আপলোড করুন',
92
  message_side: 'bot'
93
  });
94
  initialBotMessage.draw();