vishalkatheriya commited on
Commit
13bcb7c
·
verified ·
1 Parent(s): 5057fdd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -61
app.py CHANGED
@@ -1,71 +1,11 @@
1
  import streamlit as st
2
  from PIL import Image
3
-
4
- # Custom CSS for enhanced styling
5
- st.markdown("""
6
- <style>
7
- body {
8
- background-color: #f7f9fc;
9
- font-family: 'Arial', sans-serif;
10
- }
11
- .title {
12
- color: #2c3e50;
13
- font-size: 40px;
14
- font-weight: 700;
15
- text-align: center;
16
- margin-bottom: 40px;
17
- }
18
- .upload-area {
19
- background-color: #e8f4f8;
20
- padding: 20px;
21
- border-radius: 10px;
22
- border: 2px dashed #1abc9c;
23
- text-align: center;
24
- margin-bottom: 20px;
25
- }
26
- .upload-area:hover {
27
- background-color: #d1ecf1;
28
- }
29
- .generate-button {
30
- background-color: #1abc9c;
31
- color: white;
32
- border-radius: 5px;
33
- padding: 10px;
34
- font-weight: bold;
35
- cursor: pointer;
36
- text-align: center;
37
- margin-top: 20px;
38
- }
39
- .generate-button:hover {
40
- background-color: #16a085;
41
- }
42
- .result-section {
43
- margin-top: 40px;
44
- }
45
- .result-title {
46
- color: #34495e;
47
- font-size: 24px;
48
- font-weight: 600;
49
- margin-bottom: 20px;
50
- }
51
- .success {
52
- background-color: #dff0d8;
53
- color: #3c763d;
54
- padding: 15px;
55
- border-radius: 5px;
56
- }
57
- </style>
58
- """, unsafe_allow_html=True)
59
-
60
  # Initialize session state to block re-running
61
  if 'has_run' not in st.session_state:
62
  st.session_state.has_run = False
63
 
64
  # Main UI container
65
- st.sidebar.markdown('<div class="title">Florence-2 Image Captioning Demo</div>', unsafe_allow_html=True)
66
-
67
-
68
-
69
  # Image upload area
70
  uploaded_image = st.sidebar.file_uploader("Upload your image here", type=["jpg", "jpeg", "png"])
71
  # Display the uploaded image and process it if available
 
1
  import streamlit as st
2
  from PIL import Image
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  # Initialize session state to block re-running
4
  if 'has_run' not in st.session_state:
5
  st.session_state.has_run = False
6
 
7
  # Main UI container
8
+ st.sidebar.markdown('<h3>VQA</h3>', unsafe_allow_html=True)
 
 
 
9
  # Image upload area
10
  uploaded_image = st.sidebar.file_uploader("Upload your image here", type=["jpg", "jpeg", "png"])
11
  # Display the uploaded image and process it if available