prithivMLmods commited on
Commit
b12016e
·
verified ·
1 Parent(s): 03a4989

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -28,6 +28,13 @@ import re
28
  import ast
29
  import html
30
 
 
 
 
 
 
 
 
31
  # Constants for text generation
32
  MAX_MAX_NEW_TOKENS = 2048
33
  DEFAULT_MAX_NEW_TOKENS = 1024
@@ -312,18 +319,11 @@ video_examples = [
312
  ["Identify the main actions in the coca cola ad...", "example/2.mp4"]
313
  ]
314
 
315
- css = """
316
- .submit-btn {
317
- background-color: #2980b9 !important;
318
- color: white !important;
319
- }
320
- .submit-btn:hover {
321
- background-color: #3498db !important;
322
- }
323
- """
324
 
325
  # Create the Gradio Interface
326
- with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
327
  gr.Markdown("# **[OCR Net 4x](https://huggingface.co/collections/prithivMLmods/multimodal-implementations-67c9982ea04b39f0608badb0)**")
328
  with gr.Row():
329
  with gr.Column():
 
28
  import ast
29
  import html
30
 
31
+ def load_css():
32
+ css_path = os.path.join(os.path.dirname(__file__), "static", "styles.css")
33
+ if os.path.exists(css_path):
34
+ with open(css_path, "r", encoding="utf-8") as f:
35
+ return f.read()
36
+ return ""
37
+
38
  # Constants for text generation
39
  MAX_MAX_NEW_TOKENS = 2048
40
  DEFAULT_MAX_NEW_TOKENS = 1024
 
319
  ["Identify the main actions in the coca cola ad...", "example/2.mp4"]
320
  ]
321
 
322
+ #load css()
323
+ custom_css = load_css()
 
 
 
 
 
 
 
324
 
325
  # Create the Gradio Interface
326
+ with gr.Blocks(css=custom_css, theme="bethecloud/storj_theme") as demo:
327
  gr.Markdown("# **[OCR Net 4x](https://huggingface.co/collections/prithivMLmods/multimodal-implementations-67c9982ea04b39f0608badb0)**")
328
  with gr.Row():
329
  with gr.Column():