ALVHB95 commited on
Commit
783df49
·
1 Parent(s): 48bfd40
app.py CHANGED
@@ -1,20 +1,16 @@
1
  import gradio as gr
2
- from transformers import pipeline, AutoModelForCausalLM, AutoTokenizer
3
  import torch
4
  import theme
5
-
6
  from huggingface_hub import from_pretrained_keras
7
  from tensorflow.keras.applications import EfficientNetB0
8
 
9
  import tensorflow as tf
10
  from tensorflow import keras
11
  from PIL import Image
12
-
13
- theme = theme.Theme()
14
-
15
- import os
16
- import sys
17
- sys.path.append('../..')
18
 
19
  #langchain
20
  from langchain.text_splitter import RecursiveCharacterTextSplitter, CharacterTextSplitter
@@ -37,8 +33,6 @@ from langchain.document_loaders import PyPDFDirectoryLoader
37
  from langchain.output_parsers import PydanticOutputParser
38
  from langchain_community.llms import HuggingFaceHub
39
  from langchain_community.document_loaders import WebBaseLoader
40
- from pydantic.v1 import BaseModel, Field
41
- import shutil
42
 
43
 
44
  custom_title = "<span style='color: rgb(243, 239, 224);'>Green Greta</span>"
@@ -173,7 +167,6 @@ def chat_interface(question,history):
173
 
174
  chatbot_gradio_app = gr.ChatInterface(
175
  fn=chat_interface,
176
- additional_inputs=gr.Audio(sources=["microphone"]),
177
  title=custom_title
178
  )
179
 
 
1
  import gradio as gr
2
+
3
  import torch
4
  import theme
5
+ theme = theme.Theme()
6
  from huggingface_hub import from_pretrained_keras
7
  from tensorflow.keras.applications import EfficientNetB0
8
 
9
  import tensorflow as tf
10
  from tensorflow import keras
11
  from PIL import Image
12
+ from pydantic.v1 import BaseModel, Field
13
+ import shutil
 
 
 
 
14
 
15
  #langchain
16
  from langchain.text_splitter import RecursiveCharacterTextSplitter, CharacterTextSplitter
 
33
  from langchain.output_parsers import PydanticOutputParser
34
  from langchain_community.llms import HuggingFaceHub
35
  from langchain_community.document_loaders import WebBaseLoader
 
 
36
 
37
 
38
  custom_title = "<span style='color: rgb(243, 239, 224);'>Green Greta</span>"
 
167
 
168
  chatbot_gradio_app = gr.ChatInterface(
169
  fn=chat_interface,
 
170
  title=custom_title
171
  )
172
 
pdfs/Acceptable-Ways-to-separate-and-dispose-of-garbage-and-recyclables.pdf DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:17ded317a5f64e275957fe163573c814d32db17f1dd266bd1053c1b3fc156550
3
- size 5411060
 
 
 
 
pdfs/Advice-on-recycling-and-resource-recovery-FINAL-REPORT.pdf DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:1a171f4d8d68655f216906aff6a7227483d6106df1d86ea6d7186c0832dafb73
3
- size 9129696
 
 
 
 
pdfs/Guidance on municipal waste data collection.pdf DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:e72519ac0a1f98c9fdbf355f39d1bd15ec1c1d56b6f760808f1a3e4b63e697f6
3
- size 2500966
 
 
 
 
pdfs/mygov-999999999489028046.pdf DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:d77c23ca4040122f8de56bbe113260f46da1621ba8e5bf5ce7de87dde447173b
3
- size 1434758