Generated code from the API would be more usuable without HTML from post_processing/post_processing_fim

#9
by utopiah - opened

When used via the Web encapsulating in HTML makes sense but when used via the API arguably less.
It seems most of it is done via post_processing/post_processing_fim so could be good to return just the generated code with the prompt instead and post process on display.

Just in case someone else has the same problem, a quick JS regex to cleanup : result.replace(/.*#727cd6;'>/, '').replace(/<\/span.*\n/,'\n').replace(/<\/span.*/,''));.

loving this. It is fun to run python gradio prompts through and see if they are legit. Would be a neat space generator!

Input code:

import gradio as gr
gr.Interface.load(gr.Interface.load_from_file)

Advanced settings
ā–¼
Run
Generated code:

import gradio as gr
gr.Interface.load(gr.Interface.load_from_file)

Load the data

data = gr.Interface.load_from_file(
"data/data.json",
"data/data.json",
"data/data.json",
"data/data

I had wondered if you run it iteratively in a loop line by line, altering prompts with a variable depth you could have amazing results.

This is how I run it : https://twitter.com/utopiah/status/1621760472461594624 namely in VR/AR.

In terms of review/executation/modification loops I'm not there yet, I'll have to use it more but that's IMHO precisely the interesting aspect, I just had to make it work "at all" within my environment first.

Sign up or log in to comment