Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,10 +9,10 @@ import spaces
|
|
9 |
|
10 |
processor = AutoProcessor.from_pretrained("ucsahin/TraVisionLM-base", trust_remote_code=True)
|
11 |
model = AutoModelForCausalLM.from_pretrained("ucsahin/TraVisionLM-base", trust_remote_code=True)
|
12 |
-
model_od = AutoModelForCausalLM.from_pretrained("ucsahin/TraVisionLM-Object-Detection-v2", trust_remote_code=True)
|
13 |
|
14 |
model.to("cuda:0")
|
15 |
-
model_od.to("cuda:0")
|
16 |
|
17 |
@spaces.GPU
|
18 |
def bot_streaming(message, history, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
@@ -60,7 +60,7 @@ logo_path = "static/images/logo-color-v2.png"
|
|
60 |
|
61 |
PLACEHOLDER = f"""
|
62 |
<div style="display: flex; flex-direction: column; align-items: center; text-align: center; margin: 30px">
|
63 |
-
<img src="/file={logo_path}" style="width:
|
64 |
<h3>Resim yükleyin ve bir soru sorun!</h3>
|
65 |
<p>Örnek resim ve soruları kullanabilirsiniz.</p>
|
66 |
</div>
|
|
|
9 |
|
10 |
processor = AutoProcessor.from_pretrained("ucsahin/TraVisionLM-base", trust_remote_code=True)
|
11 |
model = AutoModelForCausalLM.from_pretrained("ucsahin/TraVisionLM-base", trust_remote_code=True)
|
12 |
+
# model_od = AutoModelForCausalLM.from_pretrained("ucsahin/TraVisionLM-Object-Detection-v2", trust_remote_code=True)
|
13 |
|
14 |
model.to("cuda:0")
|
15 |
+
# model_od.to("cuda:0")
|
16 |
|
17 |
@spaces.GPU
|
18 |
def bot_streaming(message, history, max_tokens, temperature, top_p, top_k, repetition_penalty):
|
|
|
60 |
|
61 |
PLACEHOLDER = f"""
|
62 |
<div style="display: flex; flex-direction: column; align-items: center; text-align: center; margin: 30px">
|
63 |
+
<img src="/file={logo_path}" style="width: 40%; height: auto; opacity: 80%">
|
64 |
<h3>Resim yükleyin ve bir soru sorun!</h3>
|
65 |
<p>Örnek resim ve soruları kullanabilirsiniz.</p>
|
66 |
</div>
|