dwb2023 commited on
Commit
1e9bcab
·
verified ·
1 Parent(s): 408dc88

Update app.py

Browse files

change model to Phi 3

Files changed (1) hide show
  1. app.py +4 -18
app.py CHANGED
@@ -17,28 +17,15 @@ DEFAULT_MAX_NEW_TOKENS = 256
17
  MAX_INPUT_TOKEN_LENGTH = 512
18
 
19
  DESCRIPTION = """\
20
- # OpenELM-270M-Instruct -- Running on CPU
21
 
22
- This Space demonstrates [apple/OpenELM-270M-Instruct](https://huggingface.co/apple/OpenELM-270M-Instruct) by Apple. Please, check the original model card for details.
23
 
24
- For additional detail on the model, including a link to the arXiv paper, refer to the [Hugging Face Paper page for OpenELM](https://huggingface.co/papers/2404.14619) .
25
-
26
- For details on pre-training, instruction tuning, and parameter-efficient finetuning for the model refer to the [OpenELM page in the CoreNet GitHub repository](https://github.com/apple/corenet/tree/main/projects/openelm) .
27
- """
28
-
29
- LICENSE = """
30
- <p/>
31
-
32
- ---
33
- As a derivative work of [apple/OpenELM-270M-Instruct](https://huggingface.co/apple/OpenELM-270M-Instruct) by Apple,
34
- this demo is governed by the original [license](https://huggingface.co/apple/OpenELM-270M-Instruct/blob/main/LICENSE)
35
-
36
- Based on the [Norod78/OpenELM_3B_Demo](https://huggingface.co/spaces/Norod78/OpenELM_3B_Demo) space.
37
  """
38
 
39
-
40
  model = AutoModelForCausalLM.from_pretrained(
41
- "apple/OpenELM-270M-Instruct",
42
  trust_remote_code=True,
43
  )
44
  tokenizer = AutoTokenizer.from_pretrained(
@@ -149,7 +136,6 @@ chat_interface = gr.ChatInterface(
149
  with gr.Blocks(css="style.css") as demo:
150
  gr.Markdown(DESCRIPTION)
151
  chat_interface.render()
152
- gr.Markdown(LICENSE)
153
 
154
  if __name__ == "__main__":
155
  demo.queue(max_size=20).launch()
 
17
  MAX_INPUT_TOKEN_LENGTH = 512
18
 
19
  DESCRIPTION = """\
20
+ # Phi-3-mini-4k-instruct -- Running on CPU
21
 
22
+ This Space demonstrates [microsoft/Phi-3-mini-4k-instruct](https://huggingface.co/microsoft/Phi-3-mini-4k-instruct) by Microsoft. Please, check the original model card for details.
23
 
24
+ For additional detail on the model, including a link to the arXiv paper, refer to the [Hugging Face Paper page for Phi 3](https://huggingface.co/papers/2404.14219) .
 
 
 
 
 
 
 
 
 
 
 
 
25
  """
26
 
 
27
  model = AutoModelForCausalLM.from_pretrained(
28
+ "microsoft/Phi-3-mini-4k-instruct",
29
  trust_remote_code=True,
30
  )
31
  tokenizer = AutoTokenizer.from_pretrained(
 
136
  with gr.Blocks(css="style.css") as demo:
137
  gr.Markdown(DESCRIPTION)
138
  chat_interface.render()
 
139
 
140
  if __name__ == "__main__":
141
  demo.queue(max_size=20).launch()