Item:OSW123e4567e89b12d3a456426614174000 /
jsondata
uuid | "123e4567-e89b-12d3-a456-426614174000" |
---|
name | "PythonEvaluationFromChatbot202507291734" |
---|
label | text | "Python Evaluation from Chatbot 2025-07-29_17-34" |
---|
lang | "en" |
---|
|
|
---|
image | "File:OSW07ef97b871ee4cb78b4579f6e53c5d95.png" |
---|
meta | uuid | "8067cdd8-d648-4abf-8b22-4e10de42489d" |
---|
change_id | "fcac22d6-a934-4968-8cac-b93be252767a" |
|
---|
|
---|
type | "Category:OSW136953ec4cbf49ef80e2343c0e1981c0" |
|
---|
output | "File:OSW07ef97b871ee4cb78b4579f6e53c5d95.png" |
|
---|
python_evaluation_code | "import matplotlib.pyplot as plt
import networkx as nx
# Create a directed graph
G = nx.DiGraph()
# Add nodes for inputs and outputs
G.add_node("Input 1", color='lightblue')
G.add_node("Input 2", color='lightblue')
G.add_node("Process", color='lightgreen')
G.add_node("Output 1", color='lightcoral')
G.add_node("Output 2", color='lightcoral')
# Add edges to represent the process flow
G.add_edges_from([
("Input 1", "Process"),
("Input 2", "Process"),
("Process", "Output 1"),
("Process", "Output 2")
])
# Define positions of nodes
pos = {
"Input 1": (-1, 1),
"Input 2": (-1, -1),
"Process": (0, 0),
"Output 1": (1, 1),
"Output 2": (1, -1)
}
# Draw the graph
plt.figure(figsize=(8, 6))
node_colors = [nx.get_node_attributes(G, "color")[node] for node in G.nodes()]
nx.draw(G, pos, with_labels=True, node_size=3000, node_color=node_colors, font_size=10, font_weight='bold', arrowsize=20)
plt.title("Process Flow Diagram")
plt.savefig("/tmp/output.png")
plt.show()" |
---|