Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

How to dynamic serve gradio content in FastAPI on runtime?

I have a business request. I now have N gradio apps, the number increases and decreases dynamically, and the content will also changes. So I want to look up the gradio app by id in a routing interface,...
muk's user avatar
  • 79
1 vote
1 answer
35 views

gradio HTML component with <script> in head of gr.Block not working

I am trying to make a gr.HTML component to be clickable in order to set the display:block of a second gr.HTML component. For this I define a <script> block and add it the the head argument of gr....
mikado's user avatar
  • 13
0 votes
0 answers
32 views

Pyinstaller: ModuleNotFoundError: No module named 'gradio_rangeslider'

I am trying to package my python program using 'gradio' for the GUI and the custom gradio addon 'gradio_rangeslider' (by freddyaboulton on GitHub). Previously I was unable to import gradio until I ...
Liam's user avatar
  • 41
-1 votes
0 answers
60 views

I can't connect with gradio to share public link after using ngrok and fastapi to build backend

Colab notebook detected. This cell will run indefinitely so that you can see errors and logs. To turn off, set debug=False in launch(). Could not create share link. Please check your internet ...
Bùi Minh Hiếu 291N13's user avatar
0 votes
0 answers
15 views

Gradio Image() component to download image with random names

I have 3 gr.Image() where they only have output when the LLM inference happen. img1 = gr.Image( label="Generated Image", type="pil", format="png", ...
Mayeenul Islam's user avatar
1 vote
1 answer
59 views

How to hide/disable processing time message?

I am using Gradio Blocks. Whenever the user sends a prompt, a spinner and a processing runtime message are shown. There is a show_progress setting in the submit method but it allows to hide both the ...
Alex Kay's user avatar
  • 289
0 votes
1 answer
46 views

How can I update display of chat history upon page refresh?

My chat UI using Gradio: import sqlite3 import gradio as gr import time formatted_history = [] sqlite = None def loadHistoryFromDB(): global sqlite,formatted_history sql="SELECT role,...
Dimitrios Desyllas's user avatar
0 votes
0 answers
25 views

How do I attach a python debugger to a Gradio UI running on IntelliJ Jupyter?

I am running Gradio in an IntelliJ Jupyter plugin editor window. I have set a breakpoint in the chat function. I run the following code to start a Gradio interface in debug mode. The breakpoint I ...
Wojtek's user avatar
  • 1,520
1 vote
0 answers
140 views

RuntimeError: "Unused kwargs" and "frozenset object has no attribute discard" with BitsAndBytes bf16 Quantized Model in Hugging Face Gradio App

I'm encountering a RuntimeError while running a BitsAndBytes bf16 quantized Gemma-2-2b model on Hugging Face Spaces with a Gradio UI. The error specifically mentions unused kwargs and an ...
doniker99's user avatar
0 votes
1 answer
73 views

how to dynamically vertically scale layout with gr.Row() and multiple gr.Column() in Gradio

I need to build a layout in Gradio with two columns. The left column will contain several checkboxes, while the right column will feature a gr.Chatbot and a gr.TextBox. I want the gr.Chatbot component ...
Andrew Anokhin's user avatar
0 votes
0 answers
37 views

Gradio & Blender Python API Conflict?

(Python 3.11) I was trying to read a Blender file in Gradio, but something weird happened that I can't understand. Here is a simplified version of the problem I met today: When I try to run this code ...
Shiki Ryougi's user avatar
0 votes
0 answers
35 views

In gradio, when custom HTML is added, the original width and height are scaled, and almost all page elements are misaligned

When custom HTML is added, the original width and height are scaled, and almost all page elements are misaligned This is a simple piece of html, but it speaks volumes. css_code= ''' .container { ...
王韵铭's user avatar
0 votes
1 answer
173 views

how to add images in the markdown html gradio

i am adding images in my Gradio header, I explored the documentation and found that, it is allowed to keep markdown or html and load images and apply CSS on it to make it stylized, however I have ...
Farooq Zaman's user avatar
0 votes
1 answer
29 views

Gradio 5.0.2 Image: how to dispatch the start_recording event

On my WSL with Ubuntu 22.04 and Python 3.10 and Node 20.10, I would like to receive the "start_recording" event from gr.Image, running in "webcam" mode. Since the event is ...
x y's user avatar
  • 1,029
2 votes
0 answers
218 views

How can I adjust the height of a Gradio ChatInterface component using CSS?

I'm working on a chatbot interface using Gradio, and I'm trying to customize the height of the gr.ChatInterface component. I attempted to set the height using the height argument in the ChatInterface ...
SHDDSFFDSDSAF's user avatar
0 votes
0 answers
34 views

Obsbot Tiny 2 in gradio Image component can not take a snapshot

I want to display the live stream of my Obsbot Tiny 2 webcam in a gradio 4.44.1 (or 5.0.0b6) Image component. Additionally, I want to use python-osc 1.9.0 to send commands to the controlling OBSBOT ...
x y's user avatar
  • 1,029
1 vote
1 answer
73 views

gradio how to hide a webcam interface

In Python 3.10 with gradio 4.44.1 on Windows 10, I struggle to hide a webcam "live" image with a button click. Currently, I am stuck with the following code: import gradio as gr import numpy ...
x y's user avatar
  • 1,029
0 votes
0 answers
62 views

the asynchronous Python program is blocked

i decided to write a telegram bot on aiogram with the implementation of the qwen 2.5 math neural network via the gradioc_lient api. The problem is that when there is an Api request, the asynchronous ...
Даниил Ачинцев's user avatar
0 votes
0 answers
117 views

How to make custom file uploading with progress bar in gradio?

I want to make my own uploading function with progress bar in Gradio, cause for some reason, gradio.File uploader is broken (it's progress bar is not displayed in some cases), so I've tried to use ...
Alexey's user avatar
  • 1,438
0 votes
0 answers
30 views

Microphone access for a deployed Gradio app on E2

I need to create a demo to test an STT Agent. I created a simple Gradio app and deployed it on EC2 instance. However, when I launch it, my browsers(Safari and Chrome) report no microphone provided. Is ...
Dmitry's user avatar
  • 13
1 vote
0 answers
97 views

Gradio progress Bar displays two times

I am working on my Gradio app in which i am using two Gradio components gr.HTML and gr.File . I have one button which calls one function through .click() method. In function i have used progress bar ...
Mit Shah's user avatar
  • 117
0 votes
0 answers
55 views

How to use Gradio Client to generate images

I'm using gradio_client (Python) to generate images using the API, and the official space has a GPU issue, so I used https://dudeicuf-black-forest-labs-flux-1-schnell.hf.space (the problem also ...
Isus Ramzy's user avatar
0 votes
2 answers
244 views

Gradio How to add user avatar in chat interface

I have a very basic code for Gradio chat interface, how can i add user avatar in Gradio chat interface import gradio as gr import random import time with gr.Blocks(theme=gr.themes.Soft()) as demo: ...
Farooq Zaman's user avatar
1 vote
1 answer
330 views

how to change favicon in Gradio python

I have a very basic code for Gradio chat interface, how can i change favicon in Gradio chat interface import time import gradio as gr def slow_echo(message, history): for i in range(len(message)): ...
Farooq Zaman's user avatar
0 votes
1 answer
365 views

Gradio app works fine using simple Dockerfile, but fails when using docker-compose

I have a simple gradio app that runs fine inside Docker, but fails when launched via docker-compose. app.py import gradio as gr def greet(name): return f"Hello {name}!" iface = gr....
MMasmoudi's user avatar
  • 550
0 votes
0 answers
36 views

Why gradio image resizes the image in one environment?

I am running the same gradio script in two different computers. It uses image_display = gr.Image(label="Image Display", interactive=False) however in one PC it shows the image occupying all ...
KansaiRobot's user avatar
  • 9,786
0 votes
0 answers
31 views

How do I link a Gradio Button to a File button?

I'm trying to make a gr.Button() activate a gr.File(). I tried linking the inputs/outputs but it doesn't work. Here's what I have: import gradio as gr with gr.Blocks() as demo: with gr.Column(): ...
Nicolas Gervais's user avatar
1 vote
0 answers
73 views

.select does not trigger

I want to create some circle on point clicked on a gradio image, here's my code import gradio as gr import numpy as np #from Modules import calcs # Global list to store clicked points clicked_points = ...
cukkoo's user avatar
  • 11
0 votes
1 answer
262 views

Simple Gradio App in Docker Container does not work in Azure Container Registrey für Azure Webapp

I try to create a webapp in Azure, which uses a docker image for a python based Gradio app, which I pushed to my Azure Container Registry before. I can't access the webapp via the default domain. I ...
MG1992's user avatar
  • 1
0 votes
1 answer
51 views

Response with Chart in Gradio

I see here some cases where plotly charts can be used (https://www.gradio.app/guides/creating-a-custom-chatbot-with-blocks) . I think the example with fig is broken here . Does anybody have experience ...
NiMa's user avatar
  • 179
0 votes
1 answer
45 views

Sequential bot messages in Gradio ChatInterface [closed]

Starting with very basic example : import random import gradio as gr def random_response(message, history): return random.choice(["Yes", "No"]) demo = gr.ChatInterface(...
NiMa's user avatar
  • 179
0 votes
1 answer
233 views

Can't Install PIP Gradio

D:\XTTS-RVC-UI>pip install gradio Collecting gradio Using cached gradio-4.40.0-py3-none-any.whl.metadata (15 kB) Collecting aiofiles<24.0,>=22.0 (from gradio) Using cached aiofiles-23.2.1-...
Huzaifa Phantom's user avatar
0 votes
0 answers
101 views

How to create a Gradio interface for PDF-based question answering in a Google Colab notebook?

I am trying to create a Gradio interface in a Google Colab notebook where I can upload a PDF file and ask questions related to its content. The interface should be able to answer the questions if they ...
Sahana Reddy Korandla's user avatar
0 votes
0 answers
71 views

Can you filter gradio datatables?

Let's say I have this code import gradio as gr import pandas as pd # Sample data for the dataframes data = { 'Name': ['Alice', 'Bob', 'Charlie'], 'Age': [25, 30, 35], 'City': ['New York', ...
KansaiRobot's user avatar
  • 9,786
0 votes
0 answers
106 views

Hugging Face Gradio API integrate with Nextjs 14.2

I wanted to deploy my ML model on web, so i hosted the model on hugging face and wanted to use the api for using it with my own UI. console error image is added for reference. The Web framework is not ...
hexronus's user avatar
1 vote
0 answers
229 views

FastAPI uvicorn starrlette gradio package errors

I am trying to upgrade a gradio app to the latest version. I have been able to get the app running again but it's throwing server errors when i go to the browser. I am getting the following errors ...
Husk Rekoms's user avatar
0 votes
1 answer
171 views

Can gradio functions return components

I want to use gradio to create a dropdown to choose a task id and fetch the json under that id and display it as custom component implemented under a block An example of how this may work is something ...
Ahmed Mustafa's user avatar
0 votes
0 answers
304 views

How can a gradio dataframe hide some columns?

I am using gradio dataframes to show some pandas dataframes. I wonder if it is possible to hide some columns when displaying. I search the internet and I found these two resources: Here it explains ...
KansaiRobot's user avatar
  • 9,786
0 votes
0 answers
230 views

Error with Tokenizer parallelism when using gradio and mlflow

I have written a script using gradio and sometimes (I emphasize this- only sometimes) when I run it I get huggingface/tokenizers: The current process just got forked, after parallelism has already ...
KansaiRobot's user avatar
  • 9,786
0 votes
1 answer
207 views

Passing data to gradio Dataframe from JavaScript

I was making my own Bounding Box editor in gradio and succeeded to make some with written JS and HTML code using canvas, but now i need to pass an information from JS where boxes are drawn and saved ...
sleshworld's user avatar
2 votes
1 answer
355 views

In a gradio tab GUI, a button calls the other tab

I have the following script import gradio as gr # Define the function for the first tab def greet(text): return f"Hello {text}" # Define the function for the second tab def farewell(...
KansaiRobot's user avatar
  • 9,786
1 vote
1 answer
754 views

How to Load an Image onto a Canvas in Gradio with Custom HTML and JavaScript?

I am willing to make a bounding box editor implementation in gradio by creating html and js by myself (where user can move bboxes, scale and draw new ones). But i can't find a way to load an image to ...
sleshworld's user avatar
0 votes
0 answers
331 views

Gradio Python - Passing Component Values to Function and Updating Interface

I am trying to implement a Gradio app that takes in a json of a conversation between users and an AI. The input json is formatted as such, where there are multiple conversations, each has an ...
Aland Liu's user avatar
2 votes
1 answer
120 views

Possible Way to have OpenAI code run on Flet?

I'm attempting to create a chatbot app for a project, I currently have everything running with OpenAI and Gradio. This is what my code looks like right now: import openai import gradio openai....
ob01's user avatar
  • 21
0 votes
0 answers
114 views

Gradio Multiple audios in sequence

I am building a gradio app to play multiple audio files in sequence with a delay of 2 seconds. I am using stop listener in a way that when one audio file ends, Stop listener gets triggered and another ...
user1590716's user avatar
0 votes
0 answers
63 views

I am getting multiple errors while running a streaming model for audio. I am using insanely-fast-whisper along with the give model

Code is: import torch from transformers import pipeline from transformers.utils import is_flash_attn_2_available pipe = pipeline( "automatic-speech-recognition", model = "...
M SAQLAIN's user avatar
0 votes
1 answer
417 views

Gradio error: TypeError: gradio.data_classes.FileData() argument after ** must be a mapping, not list

I was trying to build my first interface in Gradio, when I got this error: "Gradio error: TypeError: gradio.data_classes.FileData() argument after ** must be a mapping, not list" (Full error ...
Fraimy's user avatar
  • 15
2 votes
1 answer
347 views

Is there a way to make the rows of a gradio dataframe clickable?

I have the following script import gradio as gr import pandas as pd import numpy as np def generate_random_dataframe(): # Generate a random DataFrame df = pd.DataFrame(np.random.rand(10, 5), ...
KansaiRobot's user avatar
  • 9,786
0 votes
1 answer
315 views

How can I convert Gradio app to flask api?

I am trying to convert Gradio app to flask api. In Gradio app, it is using components like Image, Text, and so on. I have to change that component to request form data. However, I am suffering with ...
Amirul Aziz's user avatar
0 votes
0 answers
70 views

How can i use Gradio's Ul components in standalone JavaScript applications outside ofthe Gradioenvironment?

I'd like to port Gradio's JavaScript component to a React app.For example, i hope to be able to use the audio component independently.enter image description here However, as a newbie, I don't really ...
HunHun_Zi's user avatar

1
2 3 4 5