Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,12 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
from rag import respond_rag_huggingface as response_hf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
chat_history = []
|
| 5 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
from rag import respond_rag_huggingface as response_hf
|
| 3 |
+
import shutil
|
| 4 |
+
|
| 5 |
+
try:
|
| 6 |
+
shutil.rmtree("/home/user/.cache/huggingface")
|
| 7 |
+
shutil.rmtree("/home/user/.huggingface")
|
| 8 |
+
except Exception as e:
|
| 9 |
+
print("Error clearing cache:", e)
|
| 10 |
|
| 11 |
chat_history = []
|
| 12 |
|