Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from langchain_community.llms.ctransformers import CTransformers
|
| 2 |
import os
|
|
|
|
| 3 |
|
| 4 |
hf_token = os.environ.get('HF_TOKEN')
|
| 5 |
|
|
@@ -35,8 +36,8 @@ def generate_text(input_text):
|
|
| 35 |
|
| 36 |
output = llm(input_text)
|
| 37 |
print(output)
|
| 38 |
-
|
| 39 |
-
return
|
| 40 |
|
| 41 |
|
| 42 |
text_generation_interface = gr.Interface(
|
|
|
|
| 1 |
from langchain_community.llms.ctransformers import CTransformers
|
| 2 |
import os
|
| 3 |
+
import gradio as gr
|
| 4 |
|
| 5 |
hf_token = os.environ.get('HF_TOKEN')
|
| 6 |
|
|
|
|
| 36 |
|
| 37 |
output = llm(input_text)
|
| 38 |
print(output)
|
| 39 |
+
cleaned_output_text = output_text.replace(input_text, "")
|
| 40 |
+
return cleaned_output_text
|
| 41 |
|
| 42 |
|
| 43 |
text_generation_interface = gr.Interface(
|