DrishtiSharma commited on
Commit
aac1d28
·
verified ·
1 Parent(s): 650f7c0

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import os
 
2
  from datetime import datetime
3
  import streamlit as st
4
  from patentwiz import preprocess_data, qa_agent
@@ -9,6 +10,9 @@ if not api_key:
9
  st.error("OPENAI_API_KEY not found! Please set it in the environment variables or Hugging Face Secrets.")
10
  st.stop()
11
 
 
 
 
12
  PROMPT = """
13
  Task: Carefully review the given patent text and extract as much physical measurements information such as length/distance, mass/weight, time, temperature, Volume, area, speed, pressure, energy, power, electric current
14
  and voltage, frequency, force, acceleration, density, resistivity, magnetic field strength, and luminous intensity as much as possible.
 
1
  import os
2
+ import chromadb
3
  from datetime import datetime
4
  import streamlit as st
5
  from patentwiz import preprocess_data, qa_agent
 
10
  st.error("OPENAI_API_KEY not found! Please set it in the environment variables or Hugging Face Secrets.")
11
  st.stop()
12
 
13
+ # Clear ChromaDB cache to fix tenant issue
14
+ chromadb.api.client.SharedSystemClient.clear_system_cache()
15
+
16
  PROMPT = """
17
  Task: Carefully review the given patent text and extract as much physical measurements information such as length/distance, mass/weight, time, temperature, Volume, area, speed, pressure, energy, power, electric current
18
  and voltage, frequency, force, acceleration, density, resistivity, magnetic field strength, and luminous intensity as much as possible.