noahabebe commited on
Commit
e2ed786
·
verified ·
1 Parent(s): 4d2a881

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -1
app.py CHANGED
@@ -1,3 +1,12 @@
1
  import gradio as gr
 
2
 
3
- gr.load("models/codellama/CodeLlama-7b-hf").launch()
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from transformers import pipeline
3
 
4
+ gr.load("models/codellama/CodeLlama-7b-hf").launch()
5
+
6
+ # Prompt the user for input
7
+ user_input = input("AI: Ask me anything\nMe: ")
8
+
9
+ # Generate a response using the pipeline
10
+ generated_response = text_generation_pipeline(user_input, max_length=200)[0]['generated_text']
11
+
12
+ print("AI:", generated_response)