Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
"""Copy of Code Explainer.ipynb
|
|
|
|
| 3 |
Automatically generated by Colaboratory.
|
|
|
|
| 4 |
Original file is located at
|
| 5 |
https://colab.research.google.com/drive/1tBrZ0R8BVUoBwSSkv07CMTrXnsYKmeXI
|
| 6 |
"""
|
| 7 |
|
|
|
|
| 8 |
#@title Code Explainer
|
| 9 |
import gradio as gr
|
| 10 |
import google.generativeai as palm
|
|
@@ -75,7 +78,7 @@ def get_completion(code_snippet):
|
|
| 75 |
# define app UI
|
| 76 |
iface = gr.Interface(fn=get_completion, inputs=[gr.Textbox(label="Insert Code Snippet",lines=5)],
|
| 77 |
outputs=[gr.Textbox(label="Explanation Here",lines=8)],
|
| 78 |
-
title="
|
| 79 |
)
|
| 80 |
|
| 81 |
-
iface.launch()
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
"""Copy of Code Explainer.ipynb
|
| 3 |
+
|
| 4 |
Automatically generated by Colaboratory.
|
| 5 |
+
|
| 6 |
Original file is located at
|
| 7 |
https://colab.research.google.com/drive/1tBrZ0R8BVUoBwSSkv07CMTrXnsYKmeXI
|
| 8 |
"""
|
| 9 |
|
| 10 |
+
|
| 11 |
#@title Code Explainer
|
| 12 |
import gradio as gr
|
| 13 |
import google.generativeai as palm
|
|
|
|
| 78 |
# define app UI
|
| 79 |
iface = gr.Interface(fn=get_completion, inputs=[gr.Textbox(label="Insert Code Snippet",lines=5)],
|
| 80 |
outputs=[gr.Textbox(label="Explanation Here",lines=8)],
|
| 81 |
+
title="Code Explainer"
|
| 82 |
)
|
| 83 |
|
| 84 |
+
iface.launch()
|