jonathanagustin commited on
Commit
54d49be
·
verified ·
1 Parent(s): 17277b6

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -23,14 +23,6 @@ logger.info(f"VQA_MODEL: {VQA_MODEL}")
23
  client = InferenceClient(token=HF_TOKEN) if HF_TOKEN else InferenceClient()
24
  logger.info("InferenceClient initialized")
25
 
26
- # Force dark mode
27
- FORCE_DARK_MODE = """
28
- function() {
29
- if (document.querySelectorAll('.dark').length === 0) {
30
- document.querySelector('body').classList.add('dark');
31
- }
32
- }
33
- """
34
 
35
 
36
  def caption_image(image):
@@ -75,7 +67,7 @@ def answer_question(image, question: str):
75
 
76
  logger.info("Building Gradio interface...")
77
 
78
- with gr.Blocks(title="Vision Chat", js=FORCE_DARK_MODE) as demo:
79
  gr.Markdown("# 👁️ Vision Chat\nUpload an image, get a caption, and ask questions about it!")
80
 
81
  with gr.Row(equal_height=True):
 
23
  client = InferenceClient(token=HF_TOKEN) if HF_TOKEN else InferenceClient()
24
  logger.info("InferenceClient initialized")
25
 
 
 
 
 
 
 
 
 
26
 
27
 
28
  def caption_image(image):
 
67
 
68
  logger.info("Building Gradio interface...")
69
 
70
+ with gr.Blocks(title="Vision Chat") as demo:
71
  gr.Markdown("# 👁️ Vision Chat\nUpload an image, get a caption, and ask questions about it!")
72
 
73
  with gr.Row(equal_height=True):