tdnathmlenthusiast commited on
Commit
4c91d9b
1 Parent(s): 614fcf6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -4,12 +4,17 @@ from gradio import Interface as gr
4
  from pathlib import Path
5
  from fastai.text.all import *
6
  from datasets import load_dataset
 
 
 
 
 
7
 
8
  # Download and prepare SQuAD dataset (not used directly here)
9
  squad = load_dataset("squad")
10
 
11
  # Load the pre-trained summarization model (adjust model name as needed)
12
- model_name = "facebook/bart-base" # Choose a suitable summarization model
13
  tokenizer = AutoTokenizer.from_pretrained(model_name)
14
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
15
 
@@ -35,7 +40,5 @@ interface = gr.Interface(
35
  description="Enter your requirements & get valuable insight from Guru." # Description of the interface
36
  )
37
 
38
-
39
-
40
  # Start the Gradio app
41
  interface.launch(inline=True)
 
4
  from pathlib import Path
5
  from fastai.text.all import *
6
  from datasets import load_dataset
7
+ from interfaces import interfaces as interfaces1
8
+ from debinterface.interfaces import interfaces as interfaces2
9
+
10
+ adapters1 = interfaces1() # For interfaces from the 'interfaces' package
11
+ adapters2 = interfaces2() # For interfaces from the 'debinterface' package
12
 
13
  # Download and prepare SQuAD dataset (not used directly here)
14
  squad = load_dataset("squad")
15
 
16
  # Load the pre-trained summarization model (adjust model name as needed)
17
+ model_name = "laptop_summarizer_1.pkl" # Choose a suitable summarization model
18
  tokenizer = AutoTokenizer.from_pretrained(model_name)
19
  model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
20
 
 
40
  description="Enter your requirements & get valuable insight from Guru." # Description of the interface
41
  )
42
 
 
 
43
  # Start the Gradio app
44
  interface.launch(inline=True)