ultrabotbot commited on
Commit
c27e6ed
·
verified ·
1 Parent(s): 641582a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ # Initialize the pipeline with your fine-tuned model
4
+ pipe = pipeline("text-generation", model="crystal99/my-fine-tuned-model")
5
+
6
+ # Define input prompts
7
+ input_texts = [
8
+ "Solve this: 23 + 19?",
9
+ "Simplify: 48 / 6.",
10
+ "What is the square root of 64?"
11
+ ]
12
+
13
+ # Generate outputs
14
+ outputs = pipe(input_texts, max_length=50, temperature=0.7, top_k=50, top_p=0.9)
15
+
16
+ # Display results
17
+ for i, out in enumerate(outputs):
18
+ print(f"Input {i+1}: {input_texts[i]}")
19
+ print(f"Output {i+1}: {out['generated_text']}\n")
20
+