TroyDoesAI commited on
Commit
339d45e
1 Parent(s): c1002a1

Adding an Example Prompt using TextGenerationWebUI to help users get the best output. always have response start with ```mermaid graph TB;

Browse files

Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.

### Instruction:
Create the Mermaid Diagram for the following code:

### Input:
# Simple Calculator
def add(x, y):
return x + y

def subtract(x, y):
return x - y

def multiply(x, y):
return x * y

def divide(x, y):
if y != 0:
return x / y
else:
return "Cannot divide by zero"

def main():
num1 = float(input("Enter first number: "))
num2 = float(input("Enter second number: "))
operation = input("Enter operation (+, -, *, /): ")

if operation == "+":
result = add(num1, num2)
elif operation == "-":
result = subtract(num1, num2)
elif operation == "*":
result = multiply(num1, num2)
elif operation == "/":
result = divide(num1, num2)
else:
result = "Invalid operation"

print(f"Result: {result}")

### Response:
```mermaid
graph TB;

Example_Using_TextGenerationWebUI_Notebook.png ADDED