rajj0 commited on
Commit
6506ce2
·
1 Parent(s): 3a54fe9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,11 +1,13 @@
1
  import gradio as gr
2
  import transformers
3
  from transformers import pipeline
 
4
 
5
  #prompt = f"[INST] Generate abstract for the key points\n1. Chimera Design: The design of Chimera is broken into a core and extensions. The core provides basic services and visualization, while the extensions are responsible for higher level functionality, allowing third-party developers to incorporate new features according to their needs.\n2. Multiscale Extension: The Multiscale extension of Chimera allows users to visualize large-scale molecular assemblies such as viral coats. By providing a scale-based approach, it enhances the understanding of molecular structures and interactions in biological research.\n3. Collaboratory Extension: Offering the ability for researchers based in different locations to share a Chimera session interactively, the Collaboratory extension significantly improves collaboration capacity. Through this shared environment, researchers can conduct simultaneous examinations and share insights in real-time.\n4. Other Extensions: Other extensions such as Multalign Viewer, ViewDock, Movie, and Volume Viewer offer a diverse set of features. They allow the display of multiple sequence alignments, screening of docked ligand orientations, replay of molecular dynamics trajectories, and analysis of volumetric data respectively.\n5. Real-World Usage of Chimera: The abstract also discusses the practical usage of Chimera in real-world situations, pointing out its wide applicability and impact in the field of molecular biology and bioinformatics \n . [/INST]"
6
  model1 = "rajj0/abstract_ai"
7
  tokenizer = "rajj0/abstract_ai"
8
- pipe = pipeline(task="text-generation", model=model1, tokenizer=tokenizer, max_length=1000, temperature=0.7, top_p=0.92)
 
9
  def summarize(text):
10
  input = pipe(text)
11
  return input
 
1
  import gradio as gr
2
  import transformers
3
  from transformers import pipeline
4
+ from peft import PeftModel
5
 
6
  #prompt = f"[INST] Generate abstract for the key points\n1. Chimera Design: The design of Chimera is broken into a core and extensions. The core provides basic services and visualization, while the extensions are responsible for higher level functionality, allowing third-party developers to incorporate new features according to their needs.\n2. Multiscale Extension: The Multiscale extension of Chimera allows users to visualize large-scale molecular assemblies such as viral coats. By providing a scale-based approach, it enhances the understanding of molecular structures and interactions in biological research.\n3. Collaboratory Extension: Offering the ability for researchers based in different locations to share a Chimera session interactively, the Collaboratory extension significantly improves collaboration capacity. Through this shared environment, researchers can conduct simultaneous examinations and share insights in real-time.\n4. Other Extensions: Other extensions such as Multalign Viewer, ViewDock, Movie, and Volume Viewer offer a diverse set of features. They allow the display of multiple sequence alignments, screening of docked ligand orientations, replay of molecular dynamics trajectories, and analysis of volumetric data respectively.\n5. Real-World Usage of Chimera: The abstract also discusses the practical usage of Chimera in real-world situations, pointing out its wide applicability and impact in the field of molecular biology and bioinformatics \n . [/INST]"
7
  model1 = "rajj0/abstract_ai"
8
  tokenizer = "rajj0/abstract_ai"
9
+ model = PeftModel.from_pretrained(model1)
10
+ pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=1000, temperature=0.7, top_p=0.92)
11
  def summarize(text):
12
  input = pipe(text)
13
  return input