MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / set_reference

Method set_reference

utils/src/pptgen.py:59–82  ·  view source on GitHub ↗

Set the reference presentation and extracted presentation information. Args: presentation (Presentation): The presentation object. slide_induction (dict): The slide induction data. Returns: PPTGen: The updated PPTGen object.

(
        self,
        presentation: Presentation,
        slide_induction: dict,
    )

Source from the content-addressed store, hash-verified

57 self._hire_staffs(record_cost, **kwargs)
58
59 def set_reference(
60 self,
61 presentation: Presentation,
62 slide_induction: dict,
63 ):
64 """
65 Set the reference presentation and extracted presentation information.
66
67 Args:
68 presentation (Presentation): The presentation object.
69 slide_induction (dict): The slide induction data.
70
71 Returns:
72 PPTGen: The updated PPTGen object.
73 """
74 self.presentation = presentation
75 self.slide_induction = slide_induction
76 self.functional_keys = slide_induction.pop("functional_keys")
77 self.layout_names = list(slide_induction.keys())
78 self.layout_embeddings = torch.stack(
79 get_text_embedding(self.layout_names, self.text_model)
80 )
81 self.empty_prs = deepcopy(presentation)
82 return self
83
84 def generate_pres(
85 self,

Callers 1

do_generateFunction · 0.45

Calls 1

get_text_embeddingFunction · 0.90

Tested by

no test coverage detected