Spaces:
				
			
			
	
			
			
		Running
		
			on 
			
			Zero
	
	
	
			
			
	
	
	
	
		
		
		Running
		
			on 
			
			Zero
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -33,18 +33,13 @@ MAX_SEED = np.iinfo(np.int32).max 
     | 
|
| 33 | 
         | 
| 34 | 
         
             
            device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
         
     | 
| 35 | 
         | 
| 36 | 
         
            -
            #  
     | 
| 37 | 
         
            -
             
     | 
| 38 | 
         
             
            def progress_bar_html(label: str) -> str:
         
     | 
| 39 | 
         
            -
                """
         
     | 
| 40 | 
         
            -
                Returns an HTML snippet for a thin progress bar with a label.
         
     | 
| 41 | 
         
            -
                The progress bar is styled as a dark red animated bar.
         
     | 
| 42 | 
         
            -
                """
         
     | 
| 43 | 
         
             
                return f'''
         
     | 
| 44 | 
         
             
            <div style="display: flex; align-items: center;">
         
     | 
| 45 | 
         
             
                <span style="margin-right: 10px; font-size: 14px;">{label}</span>
         
     | 
| 46 | 
         
            -
                <div style="width: 110px; height: 5px; background-color: # 
     | 
| 47 | 
         
            -
                    <div style="width: 100%; height: 100%; background-color: # 
     | 
| 48 | 
         
             
                </div>
         
     | 
| 49 | 
         
             
            </div>
         
     | 
| 50 | 
         
             
            <style>
         
     | 
| 
         @@ -414,7 +409,7 @@ demo = gr.ChatInterface( 
     | 
|
| 414 | 
         
             
                examples=[
         
     | 
| 415 | 
         
             
                    [{"text": "@gemma3-4b Explain the Image", "files": ["examples/3.jpg"]}],
         
     | 
| 416 | 
         
             
                    [{"text": "@gemma3-4b Where do the major drought happen?", "files": ["examples/111.png"]}],
         
     | 
| 417 | 
         
            -
                    [{"text": "@gemma3-4b  
     | 
| 418 | 
         
             
                    ['@lightningv5 Chocolate dripping from a donut'],
         
     | 
| 419 | 
         
             
                    ["Python Program for Array Rotation"],
         
     | 
| 420 | 
         
             
                    ["@tts1 Who is Nikola Tesla, and why did he die?"],
         
     | 
| 
         | 
|
| 33 | 
         | 
| 34 | 
         
             
            device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
         
     | 
| 35 | 
         | 
| 36 | 
         
            +
            # Helper function to return a progress bar HTML snippet.
         
     | 
| 
         | 
|
| 37 | 
         
             
            def progress_bar_html(label: str) -> str:
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 38 | 
         
             
                return f'''
         
     | 
| 39 | 
         
             
            <div style="display: flex; align-items: center;">
         
     | 
| 40 | 
         
             
                <span style="margin-right: 10px; font-size: 14px;">{label}</span>
         
     | 
| 41 | 
         
            +
                <div style="width: 110px; height: 5px; background-color: #F0FFF0; border-radius: 2px; overflow: hidden;">
         
     | 
| 42 | 
         
            +
                    <div style="width: 100%; height: 100%; background-color: #00FF00 ; animation: loading 1.5s linear infinite;"></div>
         
     | 
| 43 | 
         
             
                </div>
         
     | 
| 44 | 
         
             
            </div>
         
     | 
| 45 | 
         
             
            <style>
         
     | 
| 
         | 
|
| 409 | 
         
             
                examples=[
         
     | 
| 410 | 
         
             
                    [{"text": "@gemma3-4b Explain the Image", "files": ["examples/3.jpg"]}],
         
     | 
| 411 | 
         
             
                    [{"text": "@gemma3-4b Where do the major drought happen?", "files": ["examples/111.png"]}],
         
     | 
| 412 | 
         
            +
                    [{"text": "@gemma3-4b Transcription of the letter", "files": ["examples/222.png"]}],
         
     | 
| 413 | 
         
             
                    ['@lightningv5 Chocolate dripping from a donut'],
         
     | 
| 414 | 
         
             
                    ["Python Program for Array Rotation"],
         
     | 
| 415 | 
         
             
                    ["@tts1 Who is Nikola Tesla, and why did he die?"],
         
     |