Spaces:
Sleeping
Sleeping
Anne Marthe Sophie Ngo Bibinbe
commited on
Commit
·
4db4d20
1
Parent(s):
287f781
promptTrack installed
Browse files- app.py +30 -20
- install.sh +3 -0
- requirements.txt +7 -6
app.py
CHANGED
@@ -155,33 +155,43 @@ if __name__ == "__main__":
|
|
155 |
'''
|
156 |
|
157 |
|
|
|
|
|
|
|
|
|
158 |
import gradio as gr
|
159 |
import shutil
|
160 |
import os
|
161 |
|
162 |
-
|
163 |
-
|
164 |
-
|
|
|
|
|
165 |
|
166 |
-
|
167 |
-
|
|
|
|
|
|
|
|
|
168 |
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
|
173 |
-
|
174 |
|
175 |
-
# Define Gradio interface
|
176 |
-
iface = gr.Interface(
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
)
|
183 |
|
184 |
|
185 |
-
# Launch the app
|
186 |
-
if __name__ == "__main__":
|
187 |
-
|
|
|
155 |
'''
|
156 |
|
157 |
|
158 |
+
import gradio as gr
|
159 |
+
import shutil
|
160 |
+
import os
|
161 |
+
import subprocess
|
162 |
import gradio as gr
|
163 |
import shutil
|
164 |
import os
|
165 |
|
166 |
+
# Run the .bat file before launching the app
|
167 |
+
subprocess.run(["install.sh"], shell=True)
|
168 |
+
|
169 |
+
import promptTrack
|
170 |
+
# def process_video(video_path, prompt):
|
171 |
|
172 |
+
# output_video = "output.mp4" # Placeholder for processed video
|
173 |
+
# output_file = "tracking.json" # Tracking result
|
174 |
+
# output_file_2 = "detection.json" # detection results
|
175 |
+
|
176 |
+
# # Copy the input video to simulate processing
|
177 |
+
# shutil.copy(video_path, output_video)
|
178 |
|
179 |
+
# # Create an output text file with the prompt content
|
180 |
+
# with open(output_file, "w") as f:
|
181 |
+
# f.write(f"User Prompt: {prompt}\n")
|
182 |
|
183 |
+
# return output_video, output_file
|
184 |
|
185 |
+
# # Define Gradio interface
|
186 |
+
# iface = gr.Interface(
|
187 |
+
# fn=process_video,
|
188 |
+
# inputs=[gr.File(label="Upload Video"), gr.Textbox(placeholder="Enter your prompt")],
|
189 |
+
# outputs=[gr.Video(), gr.File(label="Generated File")],
|
190 |
+
# title="Video Processing App",
|
191 |
+
# description="Upload a video and enter a prompt. The app will return the processed video and a generated file."
|
192 |
+
# )
|
193 |
|
194 |
|
195 |
+
# # Launch the app
|
196 |
+
# if __name__ == "__main__":
|
197 |
+
# iface.launch(share=True)
|
install.sh
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ PromptTrack (version test)
|
2 |
+
|
3 |
+
pip install --no-deps bytetracker
|
requirements.txt
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
1 |
+
|
2 |
+
# accelerate
|
3 |
+
# diffusers
|
4 |
+
# invisible_watermark
|
5 |
+
# torch
|
6 |
+
# transformers
|
7 |
+
# xformers
|