Questions tagged [gradio]

119 questions
1
vote
0 answers

Python, Gradio, promise chains, .then(), understanding passed and operated data

Ok I'm really struggling to find clear documentation to help me understand what's going on here. gen_events.append(shared.gradio['Generate'].click( ui.gather_interface_values, [shared.gradio[k] for k in shared.input_elements],…
1
vote
0 answers

How to update Video component in gradio?

I want to display a different video in the gr.components.Video() after the button is clicked. def update_video(input_video): video = input_video.replace('.mp4', '_out.mp4') return [gr.components.Video.update(value=video)] with…
1
vote
1 answer

huggingface expected input format

I'm trying to invoke my test hello huggingface app via API: import gradio as gr def greet(name): return "Hello " + name + "!!" iface = gr.Interface(fn=greet, inputs="text", outputs="text") iface.launch() I'm able to do this by using the…
Ya.
  • 1,671
  • 4
  • 27
  • 53
1
vote
1 answer

How to call function when "stop recording" button pressed?

I want to be able to call to a function when the button of "stop recording" is pressed. I have the following simple code: import gradio as gr def handle_streaming(stream_in): print(f" Got New Samples") def stop_streaming(): …
user3668129
  • 4,318
  • 6
  • 45
  • 87
1
vote
1 answer

SSLError ( certificate verify failed)

I'm trying to run simple gradio app with https: import gradio as gr if __name__ == "__main__": with gr.Blocks(theme=gr.themes.Glass()) as demo: testLabel = gr.Label(label="Just for test") demo.queue().launch(share=False, …
user3668129
  • 4,318
  • 6
  • 45
  • 87
1
vote
0 answers

Gradio - launch has no progress

I have been launching a new page using Gradio (launch(share = True)), it has been working great. But today, I tried to relaunch the same app without changing any of my code, it is not working. The progress is stuck after the "Running on local URL: …
Learning
  • 65
  • 4
1
vote
1 answer

Move up example block in gradio

import gradio as gr from PIL import Image def text(img): return None, None, None, 'Test' demo = gr.Interface(fn=text, inputs=gr.Image(type="pil"), examples=["rock.jpg", "rock2.jpg"], outputs=[gr.Image(), …
test tes
  • 121
  • 6
1
vote
2 answers

Drawing Bounding Boxes with Gradio

I have an YOLO Classified image with bounding boxes but how do i draw the same bounding boxes on my output image in Gradio Webapp and is there anyway for me to make the user adjust the bounding boxes in gradio? The gr.outputs.BoundingBox and…
Tejas M A
  • 11
  • 2
1
vote
1 answer

How do I remedy this attributeerror in terminal while trying to execute a gradio interface?

in Mac terminal, gotten similar errors in Jupyter. When I try and run this python app. I keep getting these errors. line 3, in import gradio as gr line 6, in demo = gr.Interface(fn=greet, inputs="text", outputs="text") AttributeError: partially…
1
vote
0 answers

How can I convert this Gradio file upload code into folder path taking one?

There is this gradio code that allows you to upload images. I prefer entering folder path as a text input. It works but instead of this one, I want to convert it into a directory path taking one reference_imgs = gr.UploadButton(label="Upload Guide…
Furkan Gözükara
  • 22,964
  • 77
  • 205
  • 342
1
vote
1 answer

Configure FastAPI app hosted on hreoku to use HTTPS

I have a gradio app mounted on a FastAPI app and hosted on Heroku, The app should request audio input permission. Locally that works but this is not the case with production. With some research I found that browsers block this kind of permissions…
1
vote
1 answer

how to solve the problem of "import gradio could not be resolved"

importing api from gradio quickstart but in terminal it's showing a prblem of "import gradio could not be resolved" how to make complier accept gradio
1
vote
1 answer

How do I gracefully close (terminate) Gradio from within gradio.Blocks()?

I am new to using Gradio. I am attempting to modify Google Colaboratory Notebook (i.e. a Jupyter Notebook) for my own purposes. I would like to terminate Gradio from within a gradio.Column() that performs my function myfunc(), once the function has…
P A N
  • 5,642
  • 15
  • 52
  • 103
1
vote
1 answer

How can I get current text from TextArea in Gradio

import gradio as gr input1 = gr.TextArea(label="Text (100 words max)", value=example, elem_id=f"input{i}") I made a Text Area, and wanna get current text value from TextArea. input1.value…
sooyeon
  • 488
  • 1
  • 5
  • 16
1
vote
1 answer

How to create a Dropdown based on other choices in Python library Gradio

I have a dataframe like HotelID Location Price 1 Paris 15 2 Madrid 80 I would like to create a gradio interface with 2 buttons : City and HotelID and with output the price. Here is the problem : I don't want user to choose an…
Novly
  • 11
  • 3