jayash391 commited on
Commit
e0f499b
·
1 Parent(s): cadb43e

Update sherlock2.py

Browse files
Files changed (1) hide show
  1. sherlock2.py +67 -33
sherlock2.py CHANGED
@@ -291,52 +291,86 @@ def chat_with_sherlock():
291
  with output_container:
292
  display_chat_history()
293
  def main():
294
- # --- Vintage Sherlock Holmes Theme ---
295
- st.set_page_config(page_title="AI Detective Sherlock Holmes", page_icon=":mag_right:")
296
-
297
- # Custom CSS for Styling
298
- vintage_css = """
299
  <style>
300
- body {
301
- background-color: #d2b48c; /* Antique White */
302
- color: #332200; /* Dark Brown */
303
- font-family: 'Times New Roman', serif;
304
- }
305
- h1, h2, h3 {
306
- color: #8b4513; /* Saddle Brown */
307
- }
308
- .stTextInput > div > div > input {
309
- border: 1px solid #8b4513;
310
- border-radius: 5px;
311
- padding: 10px;
312
- font-size: 16px;
313
- width: 100%;
314
- box-sizing: border-box;
315
- }
316
- .stButton > button {
317
- background-color: #8b4513;
318
- color: white;
319
- border: none;
320
- border-radius: 5px;
321
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
322
  </style>
323
  """
324
- st.markdown(vintage_css, unsafe_allow_html=True) # Apply custom CSS
325
 
326
- # Title and Header
327
  st.title("AI Detective Sherlock Holmes")
328
  st.header("_'Elementary, my dear Watson!'_")
329
 
330
-
 
331
  pages = {
332
  "Investigate a Case": investigate,
333
  "Chat with Sherlock": chat_with_sherlock
334
  }
 
 
 
 
 
 
335
 
336
- show_intro_popup()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
 
338
- st.sidebar.title("Navigation")
339
- page = st.sidebar.radio("Choose an action:", list(pages.keys()))
340
  pages[page]()
341
 
342
  if __name__ == "__main__":
 
291
  with output_container:
292
  display_chat_history()
293
  def main():
294
+ # --- Custom CSS for Styling ---
295
+ custom_css = """
 
 
 
296
  <style>
297
+ body {
298
+ background-color: #f8f8f8;
299
+ color: #333333;
300
+ font-family: 'Georgia', serif;
301
+ }
302
+ h1, h2, h3 {
303
+ color: #4d4d4d;
304
+ font-weight: bold;
305
+ }
306
+ .stTextInput > div > div > input {
307
+ border: 1px solid #4d4d4d;
308
+ border-radius: 5px;
309
+ padding: 10px;
310
+ font-size: 16px;
311
+ width: 100%;
312
+ box-sizing: border-box;
313
+ }
314
+ .stButton > button {
315
+ background-color: #4d4d4d;
316
+ color: white;
317
+ border: none;
318
+ border-radius: 5px;
319
+ padding: 10px 20px;
320
+ font-size: 16px;
321
+ cursor: pointer;
322
+ }
323
+ .stButton > button:hover {
324
+ background-color: #333333;
325
+ }
326
+ .stExpander > div > div {
327
+ background-color: #f0f0f0;
328
+ padding: 20px;
329
+ border-radius: 5px;
330
+ }
331
+ .stContainer {
332
+ padding: 20px;
333
+ background-color: #ffffff;
334
+ border-radius: 5px;
335
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
336
+ }
337
  </style>
338
  """
339
+ st.markdown(custom_css, unsafe_allow_html=True) # Apply custom CSS
340
 
341
+ # --- Title and Header ---
342
  st.title("AI Detective Sherlock Holmes")
343
  st.header("_'Elementary, my dear Watson!'_")
344
 
345
+ # --- Sidebar Navigation ---
346
+ st.sidebar.title("Navigation")
347
  pages = {
348
  "Investigate a Case": investigate,
349
  "Chat with Sherlock": chat_with_sherlock
350
  }
351
+ page = st.sidebar.radio("Choose an action:", list(pages.keys()))
352
+
353
+ # --- Show Intro Popup ---
354
+ with st.expander("Welcome to AI Detective Sherlock Holmes!"):
355
+ st.write("""
356
+ **Meet Sherlock Holmes, the world's most renowned detective!**
357
 
358
+ This application allows you to:
359
+
360
+ * **Investigate Cases:** Upload case files and images for Sherlock to analyze. He will use his exceptional deductive reasoning skills to uncover clues and provide insights.
361
+ * **Chat with Sherlock:** Ask him questions and get his expert opinion on various aspects of the case.
362
+
363
+ **To chat with Sherlock, go to the "Chat with Sherlock" page in the sidebar.**
364
+
365
+ **Important Note:**
366
+
367
+ While the internet can be a valuable resource, it's crucial to be aware that not all information found online is accurate or reliable. To ensure the integrity of our investigation, we prioritize the use of trustworthy sources such as official documents, witness testimonies, and expert analysis.
368
+
369
+ Therefore, **we advise against relying solely on internet searches** during the investigation process. Instead, focus on providing Sherlock with concrete evidence and factual information to facilitate his deductions.
370
+
371
+ Remember, the truth is often elusive, but with careful observation, logical reasoning, and a discerning eye, we can unravel even the most complex mysteries.
372
+ """)
373
 
 
 
374
  pages[page]()
375
 
376
  if __name__ == "__main__":