Spaces:
Sleeping
Sleeping
Revert "feat: Use Phi-4-mini-instruct"
Browse filesThis reverts commit 513c35383d20cd767ec84b0726f450b8e1e8a41f.
README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
-
title: Phi-4
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.29.0
|
@@ -9,28 +9,20 @@ app_file: app.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
# Phi-4
|
13 |
|
14 |
-
This
|
15 |
|
16 |
## π Model
|
17 |
|
18 |
-
- **Model:** [`microsoft/
|
19 |
-
- **
|
20 |
-
- **Use Case:** Text generation for assistant-style tasks with low resource usage
|
21 |
|
22 |
## π Features
|
23 |
|
24 |
-
-
|
25 |
-
-
|
26 |
-
- Hugging Face `transformers` integration
|
27 |
|
28 |
## π¦ Requirements
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
```txt
|
33 |
-
gradio>=5.29.0
|
34 |
-
transformers>=4.51.3
|
35 |
-
torch
|
36 |
-
accelerate
|
|
|
1 |
---
|
2 |
+
title: Phi-4 Reasoning Demo
|
3 |
+
emoji: π€
|
4 |
+
colorFrom: purple
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
7 |
sdk_version: 5.29.0
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
# Phi-4 Reasoning Demo (Hugging Face Space)
|
13 |
|
14 |
+
This is a Gradio-powered demo using the `microsoft/phi-4-reasoning-plus` model from Hugging Face for advanced reasoning and text generation.
|
15 |
|
16 |
## π Model
|
17 |
|
18 |
+
- **Model:** [`microsoft/phi-4-reasoning-plus`](https://huggingface.co/microsoft/phi-4-reasoning-plus)
|
19 |
+
- **Use Case:** Text generation, reasoning tasks, assistant-style prompts
|
|
|
20 |
|
21 |
## π Features
|
22 |
|
23 |
+
- Simple Gradio interface
|
24 |
+
- Accepts a user prompt and returns a generated response using the Phi-4 model
|
|
|
25 |
|
26 |
## π¦ Requirements
|
27 |
|
28 |
+
Listed in `requirements.txt`:
|
|
|
|
|
|
|
|
|
|
|
|
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
-
generator = pipeline("text-generation", model="microsoft/
|
6 |
|
7 |
def chat_with_phi(prompt):
|
8 |
response = generator(prompt, max_new_tokens=200, do_sample=False)[0]["generated_text"]
|
|
|
2 |
from transformers import pipeline
|
3 |
|
4 |
|
5 |
+
generator = pipeline("text-generation", model="microsoft/phi-4-reasoning-plus", device_map="auto")
|
6 |
|
7 |
def chat_with_phi(prompt):
|
8 |
response = generator(prompt, max_new_tokens=200, do_sample=False)[0]["generated_text"]
|