Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,42 @@ import os
|
|
3 |
import json
|
4 |
import random
|
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
from PIL import Image
|
7 |
from urllib.parse import quote # Ensure this import is included
|
8 |
|
@@ -424,43 +460,7 @@ def display_content_or_image(query):
|
|
424 |
|
425 |
|
426 |
|
427 |
-
|
428 |
-
|
429 |
-
# Imports
|
430 |
-
import base64
|
431 |
-
import glob
|
432 |
-
import json
|
433 |
-
import math
|
434 |
-
import openai
|
435 |
-
import os
|
436 |
-
import pytz
|
437 |
-
import re
|
438 |
-
import requests
|
439 |
-
import streamlit as st
|
440 |
-
import textract
|
441 |
-
import time
|
442 |
-
import zipfile
|
443 |
-
import huggingface_hub
|
444 |
-
import dotenv
|
445 |
-
from audio_recorder_streamlit import audio_recorder
|
446 |
-
from bs4 import BeautifulSoup
|
447 |
-
from collections import deque
|
448 |
-
from datetime import datetime
|
449 |
-
from dotenv import load_dotenv
|
450 |
-
from huggingface_hub import InferenceClient
|
451 |
-
from io import BytesIO
|
452 |
-
from langchain.chat_models import ChatOpenAI
|
453 |
-
from langchain.chains import ConversationalRetrievalChain
|
454 |
-
from langchain.embeddings import OpenAIEmbeddings
|
455 |
-
from langchain.memory import ConversationBufferMemory
|
456 |
-
from langchain.text_splitter import CharacterTextSplitter
|
457 |
-
from langchain.vectorstores import FAISS
|
458 |
-
from openai import ChatCompletion
|
459 |
-
from PyPDF2 import PdfReader
|
460 |
-
from templates import bot_template, css, user_template
|
461 |
-
from xml.etree import ElementTree as ET
|
462 |
-
import streamlit.components.v1 as components # Import Streamlit Components for HTML5
|
463 |
-
|
464 |
|
465 |
def add_Med_Licensing_Exam_Dataset():
|
466 |
import streamlit as st
|
|
|
3 |
import json
|
4 |
import random
|
5 |
|
6 |
+
|
7 |
+
# Imports
|
8 |
+
import base64
|
9 |
+
import glob
|
10 |
+
import json
|
11 |
+
import math
|
12 |
+
import openai
|
13 |
+
import os
|
14 |
+
import pytz
|
15 |
+
import re
|
16 |
+
import requests
|
17 |
+
import streamlit as st
|
18 |
+
import textract
|
19 |
+
import time
|
20 |
+
import zipfile
|
21 |
+
import huggingface_hub
|
22 |
+
import dotenv
|
23 |
+
import streamlit.components.v1 as components # Import Streamlit Components for HTML5
|
24 |
+
|
25 |
+
from audio_recorder_streamlit import audio_recorder
|
26 |
+
from bs4 import BeautifulSoup
|
27 |
+
from collections import deque
|
28 |
+
from datetime import datetime
|
29 |
+
from dotenv import load_dotenv
|
30 |
+
from huggingface_hub import InferenceClient
|
31 |
+
from io import BytesIO
|
32 |
+
from langchain.chat_models import ChatOpenAI
|
33 |
+
from langchain.chains import ConversationalRetrievalChain
|
34 |
+
from langchain.embeddings import OpenAIEmbeddings
|
35 |
+
from langchain.memory import ConversationBufferMemory
|
36 |
+
from langchain.text_splitter import CharacterTextSplitter
|
37 |
+
from langchain.vectorstores import FAISS
|
38 |
+
from openai import ChatCompletion
|
39 |
+
from PyPDF2 import PdfReader
|
40 |
+
from templates import bot_template, css, user_template
|
41 |
+
from xml.etree import ElementTree as ET
|
42 |
from PIL import Image
|
43 |
from urllib.parse import quote # Ensure this import is included
|
44 |
|
|
|
460 |
|
461 |
|
462 |
|
463 |
+
# ------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
|
465 |
def add_Med_Licensing_Exam_Dataset():
|
466 |
import streamlit as st
|