Spaces:
Sleeping
Sleeping
Jon Taylor
commited on
Commit
·
99ee828
1
Parent(s):
fddf13d
increased FPS
Browse files- Dockerfile +3 -0
- app/bot.py +1 -1
Dockerfile
CHANGED
|
@@ -42,6 +42,9 @@ ENV HOME=/home/user \
|
|
| 42 |
COPY ./requirements.txt /code/requirements.txt
|
| 43 |
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 44 |
|
|
|
|
|
|
|
|
|
|
| 45 |
# Copy package.json and package-lock.json
|
| 46 |
COPY --chown=user frontend/package*.json frontend/
|
| 47 |
RUN cd frontend && npm install
|
|
|
|
| 42 |
COPY ./requirements.txt /code/requirements.txt
|
| 43 |
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
| 44 |
|
| 45 |
+
# Set the working directory to the user's home directory
|
| 46 |
+
WORKDIR $HOME/app
|
| 47 |
+
|
| 48 |
# Copy package.json and package-lock.json
|
| 49 |
COPY --chown=user frontend/package*.json frontend/
|
| 50 |
RUN cd frontend && npm install
|
app/bot.py
CHANGED
|
@@ -127,7 +127,7 @@ class DailyVision(EventHandler):
|
|
| 127 |
|
| 128 |
def on_video_frame(self, participant_id, video_frame):
|
| 129 |
# Process ~15 frames per second (considering incoming frames at 30fps).
|
| 130 |
-
if time.time() - self.__time >
|
| 131 |
self.__time = time.time()
|
| 132 |
self.__image_buffer = video_frame
|
| 133 |
#self.__queue.put(video_frame)
|
|
|
|
| 127 |
|
| 128 |
def on_video_frame(self, participant_id, video_frame):
|
| 129 |
# Process ~15 frames per second (considering incoming frames at 30fps).
|
| 130 |
+
if time.time() - self.__time > 0.05:
|
| 131 |
self.__time = time.time()
|
| 132 |
self.__image_buffer = video_frame
|
| 133 |
#self.__queue.put(video_frame)
|