Questions tagged [gradio]

119 questions
0
votes
1 answer

What am I doing wrong with gradio.Dropdown? how to dynamically modify the choices of a Dropdown?

I want to create a gradio webui that shows 2 dropdown, 'rs_hw' changes dynamically according to the 'rs' value. what am i doing wrong here? import gradio as gr languages = ['spanish', 'english'] homeworks = {'spanish': ['hola', 'bien', 'gracias'],…
0
votes
0 answers

How can I make a control collapse and disappear?

I want a column holding a control to collapse when a button is clicked. with gr.Blocks() as demo: with gr.Row(): with gr.Column(scale=1, min_width=0): html_element = gr.HTML() with gr.Column(scale=0,…
SKG
  • 1,432
  • 2
  • 13
  • 23
0
votes
1 answer

What is the gradio version for using encode_url_or_file_to_base64

This is my function import gradio as gr import gradio.utils as gr_utils import gradio.processing_utils as gr_processing_utils def audio_postprocess(self, y): data = audio_postprocess_ori(self, y) if data is None: return None …
P.Chian
  • 65
  • 1
  • 7
0
votes
0 answers

How to save the chat historial of gradio.Chatbot

I have this data: data = [ {"human1": "i am human", "human2": None}, {"human1": None, "human2": "i can help"}, {"human1": None, "human2": "i can do many things"}, {"human1": "give me an example", "human2": None} ] with…
0
votes
0 answers

Gradio is not auto downloading Hugging Face model weights - auto downloading on Google Colab but not on Windows

The below code automatically downloading necessary model files and weights on Google Colab but not on Windows Any ideas? How to fix? import gradio as gr from diffusers import DiffusionPipeline import torch import base64 from io import…
0
votes
0 answers

Returning an image processed by matplotlib to gradio gets error

I am writing a function that compares two images using python, matplotlib, and gradio to see if the person in the compare image is the same as the person in the original image, and if so, returns it by writing the person's name on the image. I wrote…
Luke
  • 11
  • 2
0
votes
0 answers

change background color of gradio's bubble text box

Dear Stackoverflow Team I have been looking for ways to style (e.g. change background color) gradio's bubble text box by using the color_map property. Unfortunately color_map has been deprecated. As a result, the following command has not been…
dark.vador
  • 619
  • 1
  • 6
  • 25
0
votes
0 answers

Making Gradio look nicer, banner and watermark?

I have a Gradio dashboard I am using to demo a Python model. Since my manager wants me to demo it to some higher-ups he wants it to look nicer. Is there a way to add a banner on the top? We have a company banner I can add, I just don't know how to…
Hustlin
  • 71
  • 8
0
votes
1 answer

Gradio convert to API

I have a project in Gradio and I want to change it to API. I have some questions : How Gradio manage session ? Can I do the same with Flask ? ; I see that Gradio doesn't use user ID but still keep managing users efficiently. The thing I want to do…
welu
  • 329
  • 3
  • 12
0
votes
0 answers

Gradio Dropdown Option Hints/Tips text on hover how to do this?

When as user hovers over an option how do you have the hovered over option display a hint of text describing what the option means/does/etc...? I'm using gradio calling the…
jebarpg
  • 11
  • 3
0
votes
1 answer

Issues while using @gradio/client in Next JS,

I have installed the gradio JS library in my next js app using this command npm i @gradio/client import { useState } from 'react'; import { client } from "@gradio/client"; import styles from "./home.module.css" and even when i just import it in my…
In Dev
  • 13
  • 4
0
votes
1 answer

Blocks from gradio package unable to receive a custmized function that reads the csv or excel file

I want to manually select and upload a CSV or Excel file through gradio (tutorial of gradio), and display it on the UI interface. First, I wrote a function read_file() to read Excel or CSV files: import gradio as gr import csv import pandas as…
ah bon
  • 9,293
  • 12
  • 65
  • 148
0
votes
0 answers

No result in Gradio output

I built a CNN model classifies plant disease with set of diseases labels and tried to deploy it via Gradio library but without output What is the problem ? After i saved the model i tried to build interface via Gradio library .
0
votes
1 answer

Gradio - Print response of bot with animated characters appearing one by one like chatGPT answers

I want the characters of the answer to appear gradually, not to receive the whole answer at once. I tried my code below and several variations but didn't work! import time, random import gradio as gr def user(user_message, history): return…
skeitel
  • 271
  • 2
  • 6
  • 17
0
votes
0 answers

Gradio - Changing background colour in all devices

I am trying to force Gradio to show a white background colour ALL the time in all browsers. My code below works to force white colour on my desktop (using Firefox) but on mobile it's still showing the typical default Gradio black background. How to…
skeitel
  • 271
  • 2
  • 6
  • 17