Linsey Passarella (8lp) commited on
Commit
3645d8c
·
2 Parent(s): 57fbf7c7f93d5b

Merge branch 'main' of https://huggingface.co/spaces/Linseypass/PLTS

Browse files
Files changed (2) hide show
  1. app.py +6 -4
  2. requirements.txt +1 -2
app.py CHANGED
@@ -11,8 +11,8 @@ import nltk
11
  nltk.download('punkt')
12
 
13
  # loads Guanaco 7B model - takes around 2-3 minutes - can do this separately
14
- model_name = "llama-7b-hf"
15
- adapters_name = 'guanaco-7b'
16
  # print(f"Starting to load the model {model_name} into memory")
17
  m = AutoModelForCausalLM.from_pretrained(
18
  model_name,
@@ -145,6 +145,8 @@ demo = gr.Interface(
145
  fn=generate,
146
  inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Abstract")],
147
  outputs=[gr.Textbox(label="Keyphrases"), gr.Textbox(label="Keyphrase Elaboration"), gr.Textbox(label="Plain Language Summary")],
148
- ).launch(share = True)
 
 
 
149
 
150
- print('after launch') # now executes
 
11
  nltk.download('punkt')
12
 
13
  # loads Guanaco 7B model - takes around 2-3 minutes - can do this separately
14
+ model_name = "decapoda-research/llama-7b-hf"
15
+ adapters_name = 'timdettmers/guanaco-7b'
16
  # print(f"Starting to load the model {model_name} into memory")
17
  m = AutoModelForCausalLM.from_pretrained(
18
  model_name,
 
145
  fn=generate,
146
  inputs=[gr.Textbox(label="Title"), gr.Textbox(label="Abstract")],
147
  outputs=[gr.Textbox(label="Keyphrases"), gr.Textbox(label="Keyphrase Elaboration"), gr.Textbox(label="Plain Language Summary")],
148
+ )
149
+ demo.queue()
150
+ demo.launch()
151
+
152
 
 
requirements.txt CHANGED
@@ -6,7 +6,7 @@ altair==5.0.1
6
  annotated-types==0.5.0
7
  anyio==3.7.1
8
  async-timeout==4.0.3
9
- attrs==23.1.0
10
  blis==0.7.10
11
  catalogue==2.0.9
12
  certifi==2023.7.22
@@ -43,7 +43,6 @@ kiwisolver==1.4.4
43
  langcodes==3.3.0
44
  linkify-it-py==2.0.2
45
  lit==16.0.6
46
- markdown-it-py==3.0.0
47
  MarkupSafe==2.1.3
48
  matplotlib==3.7.2
49
  mdit-py-plugins==0.3.3
 
6
  annotated-types==0.5.0
7
  anyio==3.7.1
8
  async-timeout==4.0.3
9
+ attrs==22.2.0
10
  blis==0.7.10
11
  catalogue==2.0.9
12
  certifi==2023.7.22
 
43
  langcodes==3.3.0
44
  linkify-it-py==2.0.2
45
  lit==16.0.6
 
46
  MarkupSafe==2.1.3
47
  matplotlib==3.7.2
48
  mdit-py-plugins==0.3.3