KvrParaskevi
commited on
Commit
•
7980796
1
Parent(s):
d448d76
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,20 @@
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#import gradio as gr
|
2 |
+
|
3 |
+
#gr.load("models/KvrParaskevi/Llama-2-7b-Hotel-Booking-Model-8Bit").launch()
|
4 |
+
|
5 |
import gradio as gr
|
6 |
|
7 |
+
from transformers import pipeline
|
8 |
+
|
9 |
+
pipe = pipeline("text-generation", model="KvrParaskevi/Llama-2-7b-Hotel-Booking-Model-8Bit")
|
10 |
+
|
11 |
+
def predict(text):
|
12 |
+
return pipe(text)[0]["text"]
|
13 |
+
|
14 |
+
demo = gr.Interface(
|
15 |
+
fn=predict,
|
16 |
+
inputs='text',
|
17 |
+
outputs='text',
|
18 |
+
)
|
19 |
+
|
20 |
+
demo.launch()
|