Spaces:
Sleeping
Sleeping
feat: a
Browse files
app.py
CHANGED
|
@@ -7,11 +7,11 @@ def greet(name):
|
|
| 7 |
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
-
def infer():
|
| 11 |
from transformers import pipeline
|
| 12 |
|
| 13 |
messages = [
|
| 14 |
-
{"role": "user", "content":
|
| 15 |
]
|
| 16 |
pipe = pipeline("text-generation", model="microsoft/Phi-3-mini-4k-instruct", trust_remote_code=True)
|
| 17 |
return pipe(messages)
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
@spaces.GPU
|
| 10 |
+
def infer(name: str = "Who are you?"):
|
| 11 |
from transformers import pipeline
|
| 12 |
|
| 13 |
messages = [
|
| 14 |
+
{"role": "user", "content": name},
|
| 15 |
]
|
| 16 |
pipe = pipeline("text-generation", model="microsoft/Phi-3-mini-4k-instruct", trust_remote_code=True)
|
| 17 |
return pipe(messages)
|