Spaces:
Runtime error
Runtime error
Update app.py
Browse files23 unmodified lines242526272829307 unmodified lines3839404142434445464748495023 unmodified linesresponse = pipe(text_prompt)return response[0]['summary_text']textbox = gr.Textbox(value = """class Solution(object):def isValid(self, s):stack = []7 unmodified linesstack.append(char)return not stack""")image_code = gr.Image(value = "https://huggingface.co/spaces/PinoCorgi/CodeExplainerPython/blob/main/code.jpg")image_output = gr.Image(value = "https://huggingface.co/spaces/PinoCorgi/CodeExplainerPython/blob/main/output.jpg")demo = gr.Interface(generate_text, textbox, textbox)image_codeimage_outputif __name__ == "__main__":demo.launch()23 unmodified lines242526272829307 unmodified lines3839404142434445464748495051525323 unmodified linesresponse = pipe(text_prompt)return response[0]['summary_text']textbox1 = gr.Textbox(value = """class Solution(object):def isValid(self, s):stack = []7 unmodified linesstack.append(char)return not stack""")textbox2 = gr.Textbox()image_code = gr.Image(value = "https://huggingface.co/spaces/PinoCorgi/CodeExplainerPython/blob/main/code.jpg")image_output = gr.Image(value = "https://huggingface.co/spaces/PinoCorgi/CodeExplainerPython/blob/main/output.jpg")demo = gr.Interface(fn = generate_text, inputs = textbox, outputs = [textbox, image_code, image_output])image_codeimage_outputif __name__ == "__main__":print(f"The Inference will take approximately 1 min 30 Seconds. Attached are example images of input and output.")demo.launch()
app.py+5-2