Pouyae commited on
Commit
f433ac9
Β·
1 Parent(s): 513c353

Revert "feat: Use Phi-4-mini-instruct"

Browse files

This reverts commit 513c35383d20cd767ec84b0726f450b8e1e8a41f.

Files changed (2) hide show
  1. README.md +10 -18
  2. app.py +1 -1
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
- title: Phi-4 Mini Instruct Demo
3
- emoji: 🧠
4
- colorFrom: blue
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 Mini Instruct – Hugging Face Space
13
 
14
- This Space is a lightweight Gradio demo using the `microsoft/Phi-4-mini-instruct` model from Hugging Face for compact, instruction-tuned language generation.
15
 
16
  ## πŸ” Model
17
 
18
- - **Model:** [`microsoft/Phi-4-mini-instruct`](https://huggingface.co/microsoft/Phi-4-mini-instruct)
19
- - **Type:** Small, instruction-tuned LLM
20
- - **Use Case:** Text generation for assistant-style tasks with low resource usage
21
 
22
  ## πŸš€ Features
23
 
24
- - Lightweight and fast, great for CPU-only Spaces
25
- - Simple Gradio interface for trying out prompts
26
- - Hugging Face `transformers` integration
27
 
28
  ## πŸ“¦ Requirements
29
 
30
- Installed via `requirements.txt`:
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/microsoft/Phi-4-mini-instruct", device_map="auto")
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"]