eusholli commited on
Commit
6234614
1 Parent(s): 59844f8

added footer

Browse files
Files changed (2) hide show
  1. README.md +28 -2
  2. app.py +11 -0
README.md CHANGED
@@ -56,7 +56,7 @@ streamlit run app.py
56
 
57
  This will open a new tab in your default web browser with the Streamlit interface.
58
 
59
- ### Step 4: Using the Application
60
 
61
  #### Webcam Stream
62
 
@@ -86,7 +86,7 @@ This will open a new tab in your default web browser with the Streamlit interfac
86
  - In the "Input Stream" section, under "Or Enter Video Download URL", paste a video URL and press Enter.
87
  - The application will download and analyze the video from the provided URL and display the sentiment results.
88
 
89
- ### Step 5: Customize the Analysis
90
 
91
  You can customize the analysis function to perform your own image analysis. The default function \`analyze_frame\` performs facial sentiment analysis. To use your own analysis:
92
 
@@ -114,6 +114,32 @@ If you encounter any issues:
114
 
115
  For more detailed information, refer to the comments in the \`app.py\` file.
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  # How to Create a New Huggingface Space and Push Code to It
118
 
119
  ## Step 1: Create a New Huggingface Space
 
56
 
57
  This will open a new tab in your default web browser with the Streamlit interface.
58
 
59
+ ## Using the Application
60
 
61
  #### Webcam Stream
62
 
 
86
  - In the "Input Stream" section, under "Or Enter Video Download URL", paste a video URL and press Enter.
87
  - The application will download and analyze the video from the provided URL and display the sentiment results.
88
 
89
+ ## Customize the Analysis
90
 
91
  You can customize the analysis function to perform your own image analysis. The default function \`analyze_frame\` performs facial sentiment analysis. To use your own analysis:
92
 
 
114
 
115
  For more detailed information, refer to the comments in the \`app.py\` file.
116
 
117
+
118
+ ### Debugging using Vscode
119
+
120
+ If you are using Vscode as your IDE you can use the following launch.json file to debug the current file (e.g. app.py) in your editor.
121
+
122
+ ```json
123
+ {
124
+ "version": "0.2.0",
125
+ "configurations": [
126
+ {
127
+ "name": "Python:Streamlit",
128
+ "type": "debugpy",
129
+ "request": "launch",
130
+ "module": "streamlit",
131
+ "args": [
132
+ "run",
133
+ "${file}",
134
+ "--server.port",
135
+ "2000"
136
+ ]
137
+ }
138
+ ]
139
+ }
140
+ ```
141
+
142
+
143
  # How to Create a New Huggingface Space and Push Code to It
144
 
145
  ## Step 1: Create a New Huggingface Space
app.py CHANGED
@@ -259,10 +259,21 @@ with col1:
259
  st.subheader("Or Enter Video Download URL")
260
  video_url = st.text_input("Video URL")
261
 
 
 
 
 
 
 
 
 
 
262
 
263
  # Function to initialize the analysis UI
264
  # This function sets up the placeholders and UI elements in the analysis section.
265
  # It creates placeholders for input and output frames, analysis time, and detected labels.
 
 
266
  def analysis_init():
267
  global analysis_time, show_labels, labels_placeholder, input_placeholder, output_placeholder
268
 
 
259
  st.subheader("Or Enter Video Download URL")
260
  video_url = st.text_input("Video URL")
261
 
262
+ # Streamlit footer
263
+ st.markdown(
264
+ """
265
+ <div style="text-align: center; margin-top: 2rem;">
266
+ <p>If you want to set up your own computer vision playground see <a href="https://huggingface.co/spaces/eusholli/computer-vision-playground/blob/main/README.md" target="_blank">here</a>.</p>
267
+ </div>
268
+ """,
269
+ unsafe_allow_html=True
270
+ )
271
 
272
  # Function to initialize the analysis UI
273
  # This function sets up the placeholders and UI elements in the analysis section.
274
  # It creates placeholders for input and output frames, analysis time, and detected labels.
275
+
276
+
277
  def analysis_init():
278
  global analysis_time, show_labels, labels_placeholder, input_placeholder, output_placeholder
279