Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import pipeline
|
| 3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
|
|
| 4 |
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("sapientinc/HRM-Text-1B")
|
| 6 |
model = AutoModelForCausalLM.from_pretrained("sapientinc/HRM-Text-1B")
|
|
@@ -15,8 +15,4 @@ def chat(message, history):
|
|
| 15 |
|
| 16 |
return response
|
| 17 |
|
| 18 |
-
|
| 19 |
-
gr.Markdown("# AI Queen")
|
| 20 |
-
gr.ChatInterface(fn=chat)
|
| 21 |
-
|
| 22 |
-
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
| 3 |
+
import torch
|
| 4 |
|
| 5 |
tokenizer = AutoTokenizer.from_pretrained("sapientinc/HRM-Text-1B")
|
| 6 |
model = AutoModelForCausalLM.from_pretrained("sapientinc/HRM-Text-1B")
|
|
|
|
| 15 |
|
| 16 |
return response
|
| 17 |
|
| 18 |
+
gr.ChatInterface(fn=chat).launch()
|
|
|
|
|
|
|
|
|
|
|
|