Questions tagged [gradio]
119 questions
0
votes
1 answer
Download huggingface table / DataFrame?
I was looking at:
https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
It's a valuable data table and I wanted to download it in a machine readable format. There is no static file that is rendered out of the repo, but app.py is executed…

miku
- 181,842
- 47
- 306
- 310
0
votes
0 answers
Welcome message in python chatbot using gradio and openAI API
I have an issue,
I want my chatbot to display a welcome message in the output textbox when the user arrive on the website.
Everything else work great, but just that message don't display itself.
I'm using VSCode, python and the OpenAI API for a…

Céleste
- 7
- 3
0
votes
0 answers
How to disable tunnelling via gradio into k8s container
I am having a jupyter container on k8s and running the below code
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(fn=greet, share=True, inputs="text", outputs="text")
demo.launch(debug=True, share=True) …

Sujith Samuel
- 11
- 3
0
votes
0 answers
Gradio button in response
I'm trying to create a chatbot that I can host locally using Gradio.
I want to add a button to the output of the chatbot when it is fed certain inputs, but I can't figure out anyway to do so.
How may I go about achieving this? Or are there other…

ChrisHo1341
- 75
- 4
0
votes
1 answer
Cant resolve Import exception in python using Visual Studio Code
I am getting following exceptions when trying to execute a Python script in Visual Studio Code (VSC).
I suspect this is a simple env config issue but am new to Python and can't see it.
Import "openai" could not be resolved by Pylance
Import…

dancingbush
- 2,131
- 5
- 30
- 66
0
votes
1 answer
Gradio Interface does not output anything
Via Button click (Gradio Interface) I want to output the return value of a method of the Prompter Class:
class Prompter:
def __init__(self, gpt_model, temper):
if not os.environ.get("OPENAI_API_KEY"):
raise Exception("Please set the…

S.H
- 671
- 2
- 6
- 22
0
votes
0 answers
Issue in Image Recognition when using Gradio Sketchpad
I am using Gradio as GUI to test a machine learning algorithm, specifically the classic problem of reading a 28 by 28 pixel image of a handwritten digit. I want the GUI to be able to draw and take an input and then determine the digit. So, I have…
0
votes
0 answers
How to update table in gradio with by uploading a csv file?
I would like to upload a CSV file and update a table with the content and finally create a plot with the content, but I am stuck connecting all the components. I also could not find any good documentation of this.
import gradio as gr
default_csv =…

Soerendip
- 7,684
- 15
- 61
- 128
0
votes
2 answers
How to get the upload file location in Gradio?
I am using Gradio to build the UI. I am using the following code to upload a file.
import gradio as gr
def upload_file(files):
file_paths = [file.name for file in files]
return file_paths
with gr.Blocks() as demo:
file_output =…

Nithin
- 9,661
- 14
- 44
- 67
0
votes
1 answer
gradio HTML component with javascript code don't work
I'm trying to integrate HTML file (which contains javascript function) to gradio HTML component (gr.HTML) and it seems not to work together:
Gradio app:
import gradio as gr
with open("test.html") as f:
lines = f.readlines()
with gr.Blocks() as…

user3668129
- 4,318
- 6
- 45
- 87
0
votes
0 answers
How to open microphone on the client and not on the server?
I'm looking on gradio examples of ASR (https://gradio.app/real-time-speech-recognition/) ,and how they handle the input from the microphone.
I run this example:
import gradio as gr
import time
def transcribe(audio):
time.sleep(5)
return…

user3668129
- 4,318
- 6
- 45
- 87
0
votes
0 answers
How to get the microphone streaming input file when using blocks?
I'm trying to convert a simple example from interface to block, and I have missing part
The app displays every 2 seconds the temporary recording wav file name:
import gradio as gr
import time
def transcribe(audio, state=""):
time.sleep(2)
…

user3668129
- 4,318
- 6
- 45
- 87
0
votes
0 answers
How to fix PyPDF2 not reading uploading PDFs through Gradio Issue
Everytime the code runs, the site opens, input is entered, then all that is returned is an error in the terminal "raise EmptyFileError("Cannot read an empty file")
PyPDF2.errors.EmptyFileError: Cannot read an empty file". I have tried multiple…

Liam
- 13
- 3
0
votes
0 answers
Is it possible to integrate the simplest version of the radiology 2D app in gradio?
Here is an app example that segments an echocardiogram: https://huggingface.co/spaces/gradio/Echocardiogram-Segmentation
and here is the code: https://huggingface.co/spaces/gradio/Echocardiogram-Segmentation/blob/main/run.py
they loaded a weights…
0
votes
0 answers
Error while sending telemetry while building app in HuggingFace Spaces
I created a gradio application to tryout basic functions yesterday and it worked fine.
Today I created a new application that will differentiate between Mug and a glass. I performed the same steps I used yesterday to create a Gradio app and host it…

Aditya Rawat
- 1
- 1