update app
Browse files
app.py
CHANGED
@@ -2,6 +2,7 @@ import gradio as gr
|
|
2 |
import networkx as nx
|
3 |
import matplotlib.pyplot as plt
|
4 |
from io import BytesIO
|
|
|
5 |
|
6 |
# Initialize the lesson plan graph
|
7 |
lesson_graph = nx.DiGraph()
|
@@ -52,7 +53,10 @@ def add_to_graph(teacher_name, subject, grade_level, learning_objective, activit
|
|
52 |
buf.seek(0)
|
53 |
plt.close()
|
54 |
|
55 |
-
|
|
|
|
|
|
|
56 |
|
57 |
def clear_graph():
|
58 |
global lesson_graph
|
|
|
2 |
import networkx as nx
|
3 |
import matplotlib.pyplot as plt
|
4 |
from io import BytesIO
|
5 |
+
from PIL import Image
|
6 |
|
7 |
# Initialize the lesson plan graph
|
8 |
lesson_graph = nx.DiGraph()
|
|
|
53 |
buf.seek(0)
|
54 |
plt.close()
|
55 |
|
56 |
+
# Convert BytesIO to PIL Image
|
57 |
+
image = Image.open(buf)
|
58 |
+
|
59 |
+
return search_string, image
|
60 |
|
61 |
def clear_graph():
|
62 |
global lesson_graph
|