Questions tagged [gradio]
119 questions
7
votes
3 answers
How to stream Agent's response in Langchain?
I am using Langchain with Gradio interface in Python. I have made a conversational agent and am trying to stream its responses to the Gradio chatbot interface. I have had a look at the Langchain docs and could not find an example that implements…

MRF
- 455
- 1
- 6
- 13
5
votes
2 answers
Gradio - remove the tagline
Gradio includes a tagline "built with gradio". How can I remove that?
If for some reason this option was omitted, is there a monkey patch that can do it?

SRobertJames
- 8,210
- 14
- 60
- 107
3
votes
0 answers
What is the JSON file representing gradio chat bot?
I'm trying to call the API to a chatbot I've created with Gradio library. When I check the API documents in gradio-client, it shows that:
from gradio_client import Client
client = Client("https://c88f6cc8edfb2f573b.gradio.live/")
result =…

Khah Nguyen
- 39
- 1
3
votes
1 answer
How to specify constant inputs for Gradio click handler?
If I have the following code:
submit = gr.Button(...)
submit.click(
fn=my_func,
inputs=[
some_slider_1, # gr.Slider
some_slider_2, # gr.Slider
some_slider_3, # gr.Slider
],
outputs=[ some_text_field ]
)
How can I substitute…

Freddy Muskelberg
- 99
- 10
2
votes
0 answers
How to use huggingface + gradio API in javascript
I'm going over the fastai ML course and got stuck in the second lesson with a minor problem - a classifier app that works fine on huggingface spaces doesn't get called correctly by a script suggested by the course team. Here's the code:
Having…

Non-chemist_dude
- 53
- 2
2
votes
1 answer
How can i reload the page in gradio?
I am new to gradio and trying to make a web interface in python. I want to add a button which can restart the server and reload the page but failed.
I've tried the code:
import gradio as gr
class Processing(object):
def __init__(self, ui_obj):
…

Jun
- 21
- 2
2
votes
1 answer
Cannot record with a Gradio audio input using dynamic layout
I want to create an interface with gradio where I have an initially hidden audio input, that after some steps, e.g. receiving instructions, the user can record audio. But when I make the audio input visible it is unable to record.
import…

Bob
- 13,867
- 1
- 5
- 27
2
votes
0 answers
Gradio ERROR:asyncio:Task exception was never retrieved. When using a load function inside a block
I am running a model inferencing on Colab using Gradio. The code is such that processing is done when we receive the input, in a function similar to 'test' below. In my original code design, 'test' spawns a thread that in turn updates a global…

Neha Mittal
- 31
- 3
1
vote
2 answers
How can I use a self made tensorflow CNN model in a gradio app?
I got a self made Tensorflow CNN dat I trained for handwritten digit recognition. The code is as follows:
import tensorflow as tf
from keras.datasets import mnist
(train_data, train_labels), (test_data, test_labels) = mnist.load_data()
model_2 =…

Darkkindess
- 11
- 5
1
vote
2 answers
AttributeError: 'VectorStoreIndex' object has no attribute 'documents'
I am building my first chatbot trained on my database. I've stucked and can't move forward with the last part of my code :( My code looks as follows:
import os
from llama_index import SimpleDirectoryReader, GPTListIndex, GPTVectorStoreIndex,…

Renata Ka
- 21
- 2
1
vote
0 answers
Gradio - Way to show active hyperlink on chatbot output
How to show an active hyperlink in the output of a gradio chatbot?
I checked this but don't fully understand if the issue has been resolved or not, and where's the solution:
https://github.com/gradio-app/gradio/issues/837
This is the closest I've…

skeitel
- 271
- 2
- 6
- 17
1
vote
0 answers
How to get selected text from Gradio Texbox?
I'm currently working on a project that involves using Gradio to label parts of text data. Specifically, I want to enable users to select (i.e. highlight) a portion of the text inside one textbox and have that selected text automatically appear in…

Peyman
- 11
- 1
1
vote
0 answers
How to use OpenAI in streaming mode with Gradio?
I want to do two things:
Use OpenAI API in streaming mode (Using Langchain Agent).
Print the answer in streaming mode using Gradio
I know how to generate streaming messages using Gradio, and I know how to activate streaming mode for OpenAI;…

Eric Bellet
- 1,732
- 5
- 22
- 40
1
vote
1 answer
How to View Result Image from Output String in Gradio API
I am trying to generate an AI-Art QR code with with the Hugging Face's Gradio Python Client API in Google Colab. The API call returns an output string
/tmp/gradio/e7c2ab46e69f6712e387aa71344ee7a6b9848d67/tmplyvg8rd5.png
which I cannot view using the…

Gordon Liang
- 13
- 3
1
vote
0 answers
Cannot upload animated GIF to gradio app via gr.Image
I am trying to use gradio for a web-based gif editor. The user uploads a gif and then performs various manipulations on it.
My problem is that once the gif is uploaded as input, the resulting object is just a static image of the first GIF frame. To…

Logan Price
- 73
- 7