Deepak Sahu commited on
Commit
ee6f8cb
·
1 Parent(s): f3e8f8c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -8,16 +8,6 @@
8
  # def get_recommendation(book_title: str) -> str:
9
  # return book_title
10
 
11
- from transformers import pipeline, set_seed
12
-
13
- # CONST
14
- set_seed(42)
15
- TRAINED_CASUAL_MODEL = "LunaticMaestro/gpt2-book-summary-generator"
16
-
17
-
18
- generator_model = pipeline('text-generation', model=TRAINED_CASUAL_MODEL)
19
-
20
-
21
 
22
  # def sanity_check():
23
  # '''Validates whether the vectors count is of same as summaries present else RAISES Error
@@ -32,7 +22,7 @@ generator_model = pipeline('text-generation', model=TRAINED_CASUAL_MODEL)
32
 
33
  import gradio as gr
34
  # from z_similarity import computes_similarity_w_hypothetical
35
- # from z_hypothetical_summary import generate_summaries, generator_model
36
 
37
  def get_recommendation(book_title: str) -> str:
38
  global generator_model
 
8
  # def get_recommendation(book_title: str) -> str:
9
  # return book_title
10
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  # def sanity_check():
13
  # '''Validates whether the vectors count is of same as summaries present else RAISES Error
 
22
 
23
  import gradio as gr
24
  # from z_similarity import computes_similarity_w_hypothetical
25
+ from z_hypothetical_summary import generate_summaries, generator_model
26
 
27
  def get_recommendation(book_title: str) -> str:
28
  global generator_model